]> Cypherpunks repositories - gostls13.git/commit
runtime: wrap darwin libc calls to keep profiler happy
authorKeith Randall <khr@golang.org>
Sat, 26 May 2018 18:29:55 +0000 (11:29 -0700)
committerKeith Randall <khr@golang.org>
Tue, 29 May 2018 17:46:19 +0000 (17:46 +0000)
commitef53de8ba4d774e4eedb04192a9f03f28a9652e8
treef77eb6789ecdec95230be09b00a6af4b22abb55d
parentdb9341a02424a80a93ad50b362b881544b685e19
runtime: wrap darwin libc calls to keep profiler happy

The profiler reports "ExternalCode" when a profiler interrupt happens
while in libc code. Instead, keep track of the most recent Go frame
for the profiler to use.

There is a test for this using time.Now (runtime.TestTimePprof),
which will work once time.Now is moved to using libc (my next CL).

Change-Id: I940ea83edada482a482e2ab103d3a65589979464
Reviewed-on: https://go-review.googlesource.com/114798
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/sys_darwin.go