]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: mark race instrumentation callbacks as nosplitstack
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 6 Nov 2012 16:54:22 +0000 (20:54 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 6 Nov 2012 16:54:22 +0000 (20:54 +0400)
It speedups the race detector somewhat, but also prevents
getcallerpc() from obtaining lessstack().

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6812091

src/pkg/runtime/race.c

index bea16cc832cea06fd3c4b1c615fb7c9e197c7abe..ef7eec2b6b75beb25c32a7c0dfba0fe7ec5ad77b 100644 (file)
@@ -47,6 +47,8 @@ runtime·racefini(void)
 }
 
 // Called from instrumented code.
+// If we split stack, getcallerpc() can return runtime·lessstack().
+#pragma textflag 7
 void
 runtime·racewrite(uintptr addr)
 {
@@ -58,6 +60,8 @@ runtime·racewrite(uintptr addr)
 }
 
 // Called from instrumented code.
+// If we split stack, getcallerpc() can return runtime·lessstack().
+#pragma textflag 7
 void
 runtime·raceread(uintptr addr)
 {
@@ -69,6 +73,7 @@ runtime·raceread(uintptr addr)
 }
 
 // Called from instrumented code.
+#pragma textflag 7
 void
 runtime·racefuncenter(uintptr pc)
 {
@@ -83,6 +88,7 @@ runtime·racefuncenter(uintptr pc)
 }
 
 // Called from instrumented code.
+#pragma textflag 7
 void
 runtime·racefuncexit(void)
 {