mirror of
https://github.com/golang/go
synced 2024-11-19 18:54: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,6 +2383,8 @@ gc(struct gc_args *args)
|
|||||||
sweep.nspan = runtime·mheap.nspan;
|
sweep.nspan = runtime·mheap.nspan;
|
||||||
sweep.spanidx = 0;
|
sweep.spanidx = 0;
|
||||||
|
|
||||||
|
// Temporary disable concurrent sweep, because we see failures on builders.
|
||||||
|
if(false) {
|
||||||
runtime·lock(&gclock);
|
runtime·lock(&gclock);
|
||||||
if(sweep.g == nil)
|
if(sweep.g == nil)
|
||||||
sweep.g = runtime·newproc1(&bgsweepv, nil, 0, 0, runtime·gc);
|
sweep.g = runtime·newproc1(&bgsweepv, nil, 0, 0, runtime·gc);
|
||||||
@ -2391,6 +2393,11 @@ gc(struct gc_args *args)
|
|||||||
runtime·ready(sweep.g);
|
runtime·ready(sweep.g);
|
||||||
}
|
}
|
||||||
runtime·unlock(&gclock);
|
runtime·unlock(&gclock);
|
||||||
|
} else {
|
||||||
|
// Sweep all spans eagerly.
|
||||||
|
while(runtime·sweepone() != -1)
|
||||||
|
gcstats.npausesweep++;
|
||||||
|
}
|
||||||
|
|
||||||
runtime·MProf_GC();
|
runtime·MProf_GC();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user