diff options
Diffstat (limited to 'src/runtime/pprof/pprof.go')
| -rw-r--r-- | src/runtime/pprof/pprof.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go index d560eeade1..6708d2dfa3 100644 --- a/src/runtime/pprof/pprof.go +++ b/src/runtime/pprof/pprof.go @@ -674,9 +674,9 @@ func writeHeapInternal(w io.Writer, debug int, defaultSampleType string) error { var total runtime.MemProfileRecord for i := range p { r := &p[i] - total.AllocBytes += r.AllocBytes + total.AllocBytes += r.AllocObjects * r.ObjectSize total.AllocObjects += r.AllocObjects - total.FreeBytes += r.FreeBytes + total.FreeBytes += r.FreeObjects * r.ObjectSize total.FreeObjects += r.FreeObjects } @@ -706,7 +706,7 @@ func writeHeapInternal(w io.Writer, debug int, defaultSampleType string) error { r := &p[i] fmt.Fprintf(w, "%d: %d [%d: %d] @", r.InUseObjects(), r.InUseBytes(), - r.AllocObjects, r.AllocBytes) + r.AllocObjects, r.AllocObjects*r.ObjectSize) for _, pc := range r.Stack { fmt.Fprintf(w, " %#x", pc) } |
