Commit 2425a2e3 authored by Keith Randall's avatar Keith Randall Committed by Dmitriy Vyukov

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
parent 5d580336
......@@ -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();
......
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