1
0
mirror of https://github.com/golang/go synced 2024-11-19 17:44:43 -07:00

runtime: temporary disable concurrent GC sweep

We see failures on builders, e.g.:
http://build.golang.org/log/70bb28cd6bcf8c4f49810a011bb4337a61977bf4

LGTM=rsc, dave
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/62360043
This commit is contained in:
Dmitriy Vyukov 2014-02-13 00:03:27 +04:00
parent 2cae0591cd
commit 3cac829ff4

View File

@ -2383,14 +2383,21 @@ gc(struct gc_args *args)
sweep.nspan = runtime·mheap.nspan; sweep.nspan = runtime·mheap.nspan;
sweep.spanidx = 0; sweep.spanidx = 0;
runtime·lock(&gclock); // Temporary disable concurrent sweep, because we see failures on builders.
if(sweep.g == nil) if(false) {
sweep.g = runtime·newproc1(&bgsweepv, nil, 0, 0, runtime·gc); runtime·lock(&gclock);
else if(sweep.parked) { if(sweep.g == nil)
sweep.parked = false; sweep.g = runtime·newproc1(&bgsweepv, nil, 0, 0, runtime·gc);
runtime·ready(sweep.g); else if(sweep.parked) {
sweep.parked = false;
runtime·ready(sweep.g);
}
runtime·unlock(&gclock);
} else {
// Sweep all spans eagerly.
while(runtime·sweepone() != -1)
gcstats.npausesweep++;
} }
runtime·unlock(&gclock);
runtime·MProf_GC(); runtime·MProf_GC();
} }