]> Cypherpunks repositories - gostls13.git/commit
runtime: enable/disable SIGPROF if needed when profiling
authorIan Lance Taylor <iant@golang.org>
Wed, 7 Dec 2016 04:54:41 +0000 (20:54 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 9 Feb 2017 18:53:34 +0000 (18:53 +0000)
commite24228af2566593a18932b563e548d288ea3cbb7
tree79d44f5b8195585154d8a6ba9a112516e0f6c446
parent6a29806e018acc3bf0c17c9d6b946b9ba8edeb4d
runtime: enable/disable SIGPROF if needed when profiling

This ensures that SIGPROF is handled correctly when using
runtime/pprof in a c-archive or c-shared library.

Separate profiler handling into pre-process changes and per-thread
changes. Simplify the Windows code slightly accordingly.

Fixes #18220.

Change-Id: I5060f7084c91ef0bbe797848978bdc527c312777
Reviewed-on: https://go-review.googlesource.com/34018
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
misc/cgo/testcarchive/carchive_test.go
misc/cgo/testcarchive/main6.c [new file with mode: 0644]
misc/cgo/testcarchive/src/libgo6/sigprof.go [new file with mode: 0644]
src/runtime/os3_plan9.go
src/runtime/os_nacl.go
src/runtime/os_windows.go
src/runtime/proc.go
src/runtime/signal_unix.go