diff --git a/src/cmd/compile/internal/ssa/compile.go b/src/cmd/compile/internal/ssa/compile.go index a9365e91e1..1c2b7ac2a8 100644 --- a/src/cmd/compile/internal/ssa/compile.go +++ b/src/cmd/compile/internal/ssa/compile.go @@ -57,15 +57,16 @@ func Compile(f *Func) { if logMemStats { var mEnd runtime.MemStats runtime.ReadMemStats(&mEnd) - nAllocs := mEnd.TotalAlloc - mStart.TotalAlloc - stats = fmt.Sprintf("[%d ns %d bytes]", time, nAllocs) + nBytes := mEnd.TotalAlloc - mStart.TotalAlloc + nAllocs := mEnd.Mallocs - mStart.Mallocs + stats = fmt.Sprintf("[%d ns %d allocs %d bytes]", time, nAllocs, nBytes) } else { stats = fmt.Sprintf("[%d ns]", time) } f.Logf(" pass %s end %s\n", p.name, stats) printFunc(f) - f.Config.HTML.WriteFunc(fmt.Sprintf("after %s %s", phaseName, stats), f) + f.Config.HTML.WriteFunc(fmt.Sprintf("after %s %s", phaseName, stats), f) checkFunc(f) } diff --git a/src/cmd/compile/internal/ssa/html.go b/src/cmd/compile/internal/ssa/html.go index 44e4e19b77..c84dccf793 100644 --- a/src/cmd/compile/internal/ssa/html.go +++ b/src/cmd/compile/internal/ssa/html.go @@ -45,6 +45,10 @@ func (w *HTMLWriter) start(name string) { display: none; } +.stats { + font-size: 60%; +} + table { border: 1px solid black; table-layout: fixed;