mirror of
https://github.com/golang/go.git
synced 2025-05-20 14:53:23 +00:00
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: Rick Hudson <rlh@golang.org>
This commit is contained in:
parent
9cc22a7f1f
commit
17f6e5396b
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user