Commit 3cac829f authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

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
parent 2cae0591
......@@ -2383,14 +2383,21 @@ gc(struct gc_args *args)
sweep.nspan = runtime·mheap.nspan;
sweep.spanidx = 0;
runtime·lock(&gclock);
if(sweep.g == nil)
sweep.g = runtime·newproc1(&bgsweepv, nil, 0, 0, runtime·gc);
else if(sweep.parked) {
sweep.parked = false;
runtime·ready(sweep.g);
// Temporary disable concurrent sweep, because we see failures on builders.
if(false) {
runtime·lock(&gclock);
if(sweep.g == nil)
sweep.g = runtime·newproc1(&bgsweepv, nil, 0, 0, runtime·gc);
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();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment