mirror of
https://github.com/golang/go
synced 2024-11-12 10:00:25 -07:00
runtime: fix gctrace=1
updatememstats is called on both the m and g stacks. Call into flushallmcaches correctly. flushallmcaches can only run on the M stack. This is somewhat temporary. once ReadMemStats is in Go we can have all of this code M-only. LGTM=dvyukov R=golang-codereviews, dvyukov CC=golang-codereviews https://golang.org/cl/116880043
This commit is contained in:
parent
5d58033682
commit
2425a2e32f
@ -2172,7 +2172,10 @@ runtime·updatememstats(GCStats *stats)
|
||||
}
|
||||
|
||||
// Flush MCache's to MCentral.
|
||||
runtime·mcall(flushallmcaches_m);
|
||||
if(g == g->m->g0)
|
||||
flushallmcaches();
|
||||
else
|
||||
runtime·mcall(flushallmcaches_m);
|
||||
|
||||
// Aggregate local stats.
|
||||
cachestats();
|
||||
|
Loading…
Reference in New Issue
Block a user