]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: trace sweep completion in gcpacertrace mode
authorAustin Clements <austin@google.com>
Fri, 11 Dec 2015 22:50:22 +0000 (17:50 -0500)
committerAustin Clements <austin@google.com>
Tue, 15 Dec 2015 16:15:59 +0000 (16:15 +0000)
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>
src/runtime/mgcsweep.go

index 2cf6def33864889d6289085e932e612c361aa4ee..b00ceb0a8a326d936192344c92e9b4ebb9cdf9dd 100644 (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]