]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove go118UseTimerCreateProfiler
authorKeith Randall <khr@golang.org>
Thu, 26 Jan 2023 22:37:53 +0000 (14:37 -0800)
committerGopher Robot <gobot@golang.org>
Sat, 28 Jan 2023 19:00:35 +0000 (19:00 +0000)
Change-Id: I37b15690fef6ca5354def834b1f6094e133a9fe4
Reviewed-on: https://go-review.googlesource.com/c/go/+/463736
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Rhys Hiltner <rhys@justin.tv>
Auto-Submit: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/runtime/os_linux.go

index 3ad1e3b8fcd1d15e35c28129b46b16eb51bbb4b4..37cd8e648293172e012672d61d3e2e40a7918d87 100644 (file)
@@ -558,9 +558,6 @@ func signalM(mp *m, sig int) {
        tgkill(getpid(), int(mp.procid), sig)
 }
 
-// go118UseTimerCreateProfiler enables the per-thread CPU profiler.
-const go118UseTimerCreateProfiler = true
-
 // validSIGPROF compares this signal delivery's code against the signal sources
 // that the profiler uses, returning whether the delivery should be processed.
 // To be processed, a signal delivery from a known profiling mechanism should
@@ -619,10 +616,6 @@ func setThreadCPUProfiler(hz int32) {
        mp := getg().m
        mp.profilehz = hz
 
-       if !go118UseTimerCreateProfiler {
-               return
-       }
-
        // destroy any active timer
        if mp.profileTimerValid.Load() {
                timerid := mp.profileTimer