runtime: trace sweep completion in gcpacertrace mode

Change-Id: I7991612e4d064c15492a39c19f753df1db926203
Reviewed-on: https://go-review.googlesource.com/17747
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Austin Clements 2015-12-11 17:50:22 -05:00
parent c1cbe5b577
commit 4ad64cadf8

View File

@ -95,6 +95,9 @@ func sweepone() uintptr {
if idx >= uint32(len(work.spans)) {
mheap_.sweepdone = 1
_g_.m.locks--
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")
}
return ^uintptr(0)
}
s := work.spans[idx]