Commit 17f6e539 authored by Austin Clements's avatar Austin Clements

runtime: print sweep ratio if gcpacertrace>0

Change-Id: I5217bf4b75e110ca2946e1abecac6310ed84dad5
Reviewed-on: https://go-review.googlesource.com/21205
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: default avatarRick Hudson <rlh@golang.org>
parent 9cc22a7f
...@@ -96,7 +96,7 @@ func sweepone() uintptr { ...@@ -96,7 +96,7 @@ func sweepone() uintptr {
mheap_.sweepdone = 1 mheap_.sweepdone = 1
_g_.m.locks-- _g_.m.locks--
if debug.gcpacertrace > 0 && idx == uint32(len(work.spans)) { if debug.gcpacertrace > 0 && idx == uint32(len(work.spans)) {
print("pacer: sweep done at heap size ", memstats.heap_live>>20, "MB; allocated ", mheap_.spanBytesAlloc>>20, "MB of spans; swept ", mheap_.pagesSwept, " pages\n") print("pacer: sweep done at heap size ", memstats.heap_live>>20, "MB; allocated ", mheap_.spanBytesAlloc>>20, "MB of spans; swept ", mheap_.pagesSwept, " pages at ", mheap_.sweepPagesPerByte, " pages/byte\n")
} }
return ^uintptr(0) return ^uintptr(0)
} }
......
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