diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2018-03-06 21:28:24 -0800 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2018-05-03 17:04:22 +0000 |
| commit | 4d7cf3fedbc382215df5ff6167ee9782a9cc9375 (patch) | |
| tree | 47fa97c217aab8e22fedeed15e43a5be61890b56 /src/runtime/time.go | |
| parent | 4704149e04b89a2c3f3d361facdab55b659fb527 (diff) | |
| download | go-4d7cf3fedbc382215df5ff6167ee9782a9cc9375.tar.xz | |
runtime: convert g.waitreason from string to uint8
Every time I poke at #14921, the g.waitreason string
pointer writes show up.
They're not particularly important performance-wise,
but it'd be nice to clear the noise away.
And it does open up a few extra bytes in the g struct
for some future use.
This is a re-roll of CL 99078, which was rolled
back because of failures on s390x.
Those failures were apparently due to an old version of gdb.
Change-Id: Icc2c12f449b2934063fd61e272e06237625ed589
Reviewed-on: https://go-review.googlesource.com/111256
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Munday <mike.munday@ibm.com>
Diffstat (limited to 'src/runtime/time.go')
| -rw-r--r-- | src/runtime/time.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/time.go b/src/runtime/time.go index 3ac60f3aec..4308cc0f0b 100644 --- a/src/runtime/time.go +++ b/src/runtime/time.go @@ -99,7 +99,7 @@ func timeSleep(ns int64) { tb := t.assignBucket() lock(&tb.lock) tb.addtimerLocked(t) - goparkunlock(&tb.lock, "sleep", traceEvGoSleep, 2) + goparkunlock(&tb.lock, waitReasonSleep, traceEvGoSleep, 2) } // startTimer adds t to the timer heap. @@ -250,7 +250,7 @@ func timerproc(tb *timersBucket) { if delta < 0 || faketime > 0 { // No timers left - put goroutine to sleep. tb.rescheduling = true - goparkunlock(&tb.lock, "timer goroutine (idle)", traceEvGoBlock, 1) + goparkunlock(&tb.lock, waitReasonTimerGoroutineIdle, traceEvGoBlock, 1) continue } // At least one timer pending. Sleep until then. |
