runtime: allow per-OS changes to unix profiler

Updates #35057

Change-Id: I56ea8f4750022847f0866c85e237a2cea40e0ff7
Reviewed-on: https://go-review.googlesource.com/c/go/+/342053
Run-TryBot: Rhys Hiltner <rhys@justin.tv>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
Rhys Hiltner 2021-08-13 08:51:46 -07:00 committed by Michael Pratt
parent 3d795ea798
commit f9e90f7e74
9 changed files with 124 additions and 8 deletions

View file

@ -289,6 +289,19 @@ func sigdelset(mask *sigset, i int) {
func (c *sigctxt) fixsigcode(sig uint32) {
}
func setProcessCPUProfiler(hz int32) {
setProcessCPUProfilerTimer(hz)
}
func setThreadCPUProfiler(hz int32) {
setThreadCPUProfilerHz(hz)
}
//go:nosplit
func validSIGPROF(mp *m, c *sigctxt) bool {
return true
}
//go:nosplit
func semacreate(mp *m) {
if mp.waitsema != 0 {