diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index 2c7dd85b243..d4e5d055ded 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=") + } else { + print(" wbuf1.n=", gcw.wbuf1.nobj) + } + if gcw.wbuf2 == nil { + print(" wbuf2=") + } 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