]> Cypherpunks repositories - gostls13.git/commit
runtime: fix wall time computation in macOS High Sierra
authorGiovanni Bajo <rasky@develer.com>
Sat, 30 Sep 2017 09:44:21 +0000 (11:44 +0200)
committerIan Lance Taylor <iant@golang.org>
Tue, 3 Oct 2017 20:33:29 +0000 (20:33 +0000)
commitd8ff3d592088ef175222dbf69991887f0dd458d6
treeb1f2daf0fa61442d5c39b7a8c69594527dbe3054
parentb78bce08e3715aed96109a67849bbe6c334515f3
runtime: fix wall time computation in macOS High Sierra

Latest macOS High Sierra changed how the wall time information
is exported into the commpage. Backward compatibility was partly
preserved, that is previous Go versions are basically forced to
go through a syscall which is much slower and is not able to
get nanosecond precision.

Implement the new commpage layout and wall time computation,
using a version check to fallback to the previous code on
older operating systems.

Fixes #22037

Change-Id: I8c2176eaca83a5d7be23443946a6b4c653ec7f68
Reviewed-on: https://go-review.googlesource.com/67332
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/sys_darwin_amd64.s