runtime: add per-pause gc stats

R=r, r2
CC=golang-dev
https://golang.org/cl/3980042
This commit is contained in:
Russ Cox 2011-01-19 13:41:42 -05:00
parent 61a4e9812e
commit bcd910cfe2
8 changed files with 97 additions and 30 deletions

View file

@ -39,6 +39,7 @@ type MemStatsType struct {
Sys uint64 // bytes obtained from system (should be sum of XxxSys below)
Lookups uint64 // number of pointer lookups
Mallocs uint64 // number of mallocs
Frees uint64 // number of frees
// Main allocation heap statistics.
HeapAlloc uint64 // bytes allocated and still in use
@ -60,11 +61,12 @@ type MemStatsType struct {
BuckHashSys uint64 // profiling bucket hash table
// Garbage collector statistics.
NextGC uint64
PauseNs uint64
NumGC uint32
EnableGC bool
DebugGC bool
NextGC uint64
PauseTotalNs uint64
PauseNs [256]uint64 // most recent GC pause times
NumGC uint32
EnableGC bool
DebugGC bool
// Per-size allocation statistics.
// Not locked during update; approximate.