diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2018-03-06 21:28:24 -0800 |
---|---|---|
committer | Josh Bleecher Snyder <josharian@gmail.com> | 2018-03-12 21:56:50 +0000 |
commit | 4eea887fd477368653f6fcf8ad766030167936e5 (patch) | |
tree | dee030c606077310b3a6abbace192ad2c9bed332 /src/runtime/select.go | |
parent | 025134b0d1b5e5ea2c5216fe4ccb060ab1bea59a (diff) | |
download | go-git-4eea887fd477368653f6fcf8ad766030167936e5.tar.gz |
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.
Change-Id: I7ffbd52fbc2a286931a2218038fda52ed6473cc9
Reviewed-on: https://go-review.googlesource.com/99078
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/select.go')
-rw-r--r-- | src/runtime/select.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/select.go b/src/runtime/select.go index b59c096928..c48aee0642 100644 --- a/src/runtime/select.go +++ b/src/runtime/select.go @@ -189,7 +189,7 @@ func selparkcommit(gp *g, _ unsafe.Pointer) bool { } func block() { - gopark(nil, nil, "select (no cases)", traceEvGoStop, 1) // forever + gopark(nil, nil, waitReasonSelectNoCases, traceEvGoStop, 1) // forever } // selectgo implements the select statement. @@ -389,7 +389,7 @@ loop: // wait for someone to wake us up gp.param = nil - gopark(selparkcommit, nil, "select", traceEvGoBlockSelect, 1) + gopark(selparkcommit, nil, waitReasonSelect, traceEvGoBlockSelect, 1) sellock(scases, lockorder) |