mirror of
https://github.com/golang/go
synced 2024-11-19 17:04:41 -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:
parent
2cae0591cd
commit
3cac829ff4
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user