From 86e7323bdf8cb2c614ff6b63ca5909f484db8642 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Tue, 12 Jul 2011 10:56:21 -0700 Subject: [PATCH] =?utf8?q?runtime:=20eliminate=20false=20sharing=20during?= =?utf8?q?=20stack=20growth=20Remove=20static=20variable=20from=20runtime?= =?utf8?q?=C2=B7oldstack().=20Benchmark=20results=20on=20HP=20Z600=20(2=20?= =?utf8?q?x=20Xeon=20E5620,=208=20HT=20cores,=202.40GHz)=20are=20as=20foll?= =?utf8?q?ows=20(with=20CL=204657091=20applied):=20benchmark=20=20=20=20?= =?utf8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?utf8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20old=20ns/op=20=20?= =?utf8?q?=20=20new=20ns/op=20=20=20=20delta=20BenchmarkStackGrowth=20=20?= =?utf8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?utf8?q?=20=20=20=20=20=20=20=201183.00=20=20=20=20=20=201180.00=20=20?= =?utf8?q?=20-0.25%=20BenchmarkStackGrowth-2=20=20=20=20=20=20=20=20=20=20?= =?utf8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=201249.00?= =?utf8?q?=20=20=20=20=20=201211.00=20=20=20-3.04%=20BenchmarkStackGrowth-?= =?utf8?q?4=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?utf8?q?=20=20=20=20=20=20=20=20=20954.00=20=20=20=20=20=20=20805.00=20?= =?utf8?q?=20-15.62%=20BenchmarkStackGrowth-8=20=20=20=20=20=20=20=20=20?= =?utf8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=207?= =?utf8?q?01.00=20=20=20=20=20=20=20683.00=20=20=20-2.57%=20BenchmarkStack?= =?utf8?q?Growth-16=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?utf8?q?=20=20=20=20=20=20=20=20=20=20=20465.00=20=20=20=20=20=20=20415.?= =?utf8?q?00=20=20-10.75%?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit R=rsc CC=golang-dev https://golang.org/cl/4693042 --- src/pkg/runtime/proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 133203a3ac..17397ca821 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -709,7 +709,7 @@ runtime·oldstack(void) uint32 argsize; byte *sp; G *g1; - static int32 goid; + int32 goid; //printf("oldstack m->cret=%p\n", m->cret); @@ -723,6 +723,7 @@ runtime·oldstack(void) runtime·mcpy(top->argp, sp, argsize); } goid = old.gobuf.g->goid; // fault if g is bad, before gogo + USED(goid); if(old.free != 0) runtime·stackfree(g1->stackguard - StackGuard, old.free); -- 2.50.0