MSpanSys uint64
MCacheInuse uint64 // mcache structures
MCacheSys uint64
+ MHeapMapSys uint64 // heap map
+ BuckHashSys uint64 // profiling bucket hash table
// Garbage collector statistics.
NextGC uint64
uint64 mspan_sys;
uint64 mcache_inuse; // MCache structures
uint64 mcache_sys;
+ uint64 heapmap_sys; // heap map
+ uint64 buckhash_sys; // profiling bucket hash table
// Statistics about garbage collector.
// Protected by stopping the world during GC.
p2 = m->allocator(sizeof *p2);
if(p2 == nil)
return false;
+ mstats.heapmap_sys += sizeof *p2;
m->p[i1] = p2;
}
p3 = m->allocator(sizeof *p3);
if(p3 == nil)
return false;
+ mstats.heapmap_sys += sizeof *p3;
p2->p[i2] = p3;
}
fmt.Fprintf(b, "# Stack = %d / %d\n", s.StackInuse, s.StackSys)
fmt.Fprintf(b, "# MSpan = %d / %d\n", s.MSpanInuse, s.MSpanSys)
fmt.Fprintf(b, "# MCache = %d / %d\n", s.MCacheInuse, s.MCacheSys)
+ fmt.Fprintf(b, "# MHeapMapSys = %d\n", s.MHeapMapSys)
+ fmt.Fprintf(b, "# BuckHashSys = %d\n", s.BuckHashSys)
fmt.Fprintf(b, "# NextGC = %d\n", s.NextGC)
fmt.Fprintf(b, "# PauseNs = %d\n", s.PauseNs)
fmt.Fprintf(b, "# DebugGC = %v\n", s.DebugGC)
fmt.Fprintf(b, "# BySize = Size * (Active = Mallocs - Frees)\n")
+ fmt.Fprintf(b, "# (Excluding large blocks.)\n")
for _, t := range s.BySize {
if t.Mallocs > 0 {
fmt.Fprintf(b, "# %d * (%d = %d - %d)\n", t.Size, t.Mallocs-t.Frees, t.Mallocs, t.Frees)