summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2014-07-20 15:07:10 +0400
committerDmitriy Vyukov <dvyukov@google.com>2014-07-20 15:07:10 +0400
commitb611e3621530bc4cbb9f6fa0f394fcbce36e506d (patch)
treefe8b1c0f796129ecbcf2c5db08763f928601146c /test
parentfa655c38c29bc13a359c57a08ee348a110afa84e (diff)
downloadgo-b611e3621530bc4cbb9f6fa0f394fcbce36e506d.tar.gz
cmd/gc: allocate select descriptor on stack
benchmark old ns/op new ns/op delta BenchmarkSelectUncontended 220 165 -25.00% BenchmarkSelectContended 209 161 -22.97% BenchmarkSelectProdCons 1042 904 -13.24% But more importantly this change will allow to get rid of free function in runtime. Fixes issue 6494. LGTM=rsc, khr R=golang-codereviews, rsc, dominik.honnef, khr CC=golang-codereviews, remyoudompheng https://codereview.appspot.com/107670043
Diffstat (limited to 'test')
-rw-r--r--test/live.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/live.go b/test/live.go
index b4cced47e..fd5279847 100644
--- a/test/live.go
+++ b/test/live.go
@@ -138,7 +138,7 @@ var b bool
// this used to have a spurious "live at entry to f11a: ~r0"
func f11a() *int {
- select { // ERROR "live at call to selectgo: autotmp"
+ select { // ERROR "live at call to newselect: autotmp" "live at call to selectgo: autotmp"
case <-c: // ERROR "live at call to selectrecv: autotmp"
return nil
case <-c: // ERROR "live at call to selectrecv: autotmp"
@@ -153,7 +153,7 @@ func f11b() *int {
// get to the bottom of the function.
// This used to have a spurious "live at call to printint: p".
print(1) // nothing live here!
- select { // ERROR "live at call to selectgo: autotmp"
+ select { // ERROR "live at call to newselect: autotmp" "live at call to selectgo: autotmp"
case <-c: // ERROR "live at call to selectrecv: autotmp"
return nil
case <-c: // ERROR "live at call to selectrecv: autotmp"
@@ -170,7 +170,7 @@ func f11c() *int {
// Unlike previous, the cases in this select fall through,
// so we can get to the println, so p is not dead.
print(1) // ERROR "live at call to printint: p"
- select { // ERROR "live at call to newselect: p" "live at call to selectgo: autotmp.* p"
+ select { // ERROR "live at call to newselect: autotmp.* p" "live at call to selectgo: autotmp.* p"
case <-c: // ERROR "live at call to selectrecv: autotmp.* p"
case <-c: // ERROR "live at call to selectrecv: autotmp.* p"
}