diff options
author | Dmitriy Vyukov <dvyukov@google.com> | 2014-06-20 16:36:21 -0700 |
---|---|---|
committer | Dmitriy Vyukov <dvyukov@google.com> | 2014-06-20 16:36:21 -0700 |
commit | 79e5fd6b531f117ca3b07fa16a9487fa5f4c07a8 (patch) | |
tree | e64d735ae2005ac876a500fffbd7903e7c3c991c /src/pkg/runtime/proc.c | |
parent | 057813ccddddbc633394deb6390142f7ea4586f4 (diff) | |
download | go-79e5fd6b531f117ca3b07fa16a9487fa5f4c07a8.tar.gz |
runtime/race: update runtime to tip
This requires minimal changes to the runtime hooks. In particular,
synchronization events must be done only on valid addresses now,
so I've added the additional checks to race.c.
LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/101000046
Diffstat (limited to 'src/pkg/runtime/proc.c')
-rw-r--r-- | src/pkg/runtime/proc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 914a02e0b..b81267210 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -143,6 +143,11 @@ runtime·schedinit(void) byte *p; Eface i; + // raceinit must be the first call to race detector. + // In particular, it must be done before mallocinit below calls racemapshadow. + if(raceenabled) + g->racectx = runtime·raceinit(); + runtime·sched.maxmcount = 10000; runtime·precisestack = true; // haveexperiment("precisestack"); @@ -181,9 +186,6 @@ runtime·schedinit(void) runtime·copystack = false; mstats.enablegc = 1; - - if(raceenabled) - g->racectx = runtime·raceinit(); } extern void main·init(void); |