]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: print sweep ratio if gcpacertrace>0
authorAustin Clements <austin@google.com>
Tue, 29 Mar 2016 14:11:09 +0000 (10:11 -0400)
committerAustin Clements <austin@google.com>
Wed, 30 Mar 2016 02:27:58 +0000 (02:27 +0000)
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>
src/runtime/mgcsweep.go

index d6d91d202149171994e27439c9d15ad71654a491..31d1a801831790ac1dbbb3f41d9191fe4b4f8fdd 100644 (file)
@@ -96,7 +96,7 @@ func sweepone() uintptr {
                        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")
+                               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)
                }