summaryrefslogtreecommitdiff
path: root/src/runtime/mgc.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2018-11-19 10:36:45 -0500
committerAustin Clements <austin@google.com>2018-11-21 16:20:19 +0000
commitb8fad4b33d20224f2965a1e9cdbd931fda0ed636 (patch)
tree2cf2bdb4057f2eb2a389871e4bd7060068039486 /src/runtime/mgc.go
parent4a8ce14af9941e3efbeb88b564bde76cc0b2e121 (diff)
downloadgo-git-b8fad4b33d20224f2965a1e9cdbd931fda0ed636.tar.gz
runtime: improve "P has cached GC work" debug info
For #27993. Change-Id: I20127e8a9844c2c488f38e1ab1f8f5a27a5df03e Reviewed-on: https://go-review.googlesource.com/c/149968 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/mgc.go')
-rw-r--r--src/runtime/mgc.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go
index 2c7dd85b24..d4e5d055de 100644
--- a/src/runtime/mgc.go
+++ b/src/runtime/mgc.go
@@ -1934,6 +1934,19 @@ func gcMark(start_time int64) {
gcw := &p.gcw
if !gcw.empty() {
+ printlock()
+ print("runtime: P ", p.id, " flushedWork ", gcw.flushedWork)
+ if gcw.wbuf1 == nil {
+ print(" wbuf1=<nil>")
+ } else {
+ print(" wbuf1.n=", gcw.wbuf1.nobj)
+ }
+ if gcw.wbuf2 == nil {
+ print(" wbuf2=<nil>")
+ } else {
+ print(" wbuf2.n=", gcw.wbuf2.nobj)
+ }
+ print("\n")
throw("P has cached GC work at end of mark termination")
}
// There may still be cached empty buffers, which we