]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: don't stop bitmap dump at BitsDead
authorKeith Randall <khr@golang.org>
Thu, 6 Nov 2014 17:30:41 +0000 (09:30 -0800)
committerKeith Randall <khr@golang.org>
Thu, 6 Nov 2014 17:30:41 +0000 (09:30 -0800)
Stack bitmaps need to be scanned past any BitsDead entries.

Object bitmaps will not have any BitsDead in them (bitmap extraction stops at
the first BitsDead entry in makeheapobjbv).  data/bss bitmaps also have no BitsDead entries.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/168270043

src/runtime/heapdump.c

index 94a4bd2be5dac300bf4a00b67320a7286f500f50..eddbc1d1c943bafe6b8283f9387e893135040ec8 100644 (file)
@@ -251,7 +251,9 @@ dumpbv(BitVector *bv, uintptr offset)
        for(i = 0; i < bv->n; i += BitsPerPointer) {
                switch(bv->bytedata[i/8] >> i%8 & 3) {
                case BitsDead:
-                       return;
+                       // BitsDead has already been processed in makeheapobjbv.
+                       // We should only see it in stack maps, in which case we should continue processing.
+                       break;
                case BitsScalar:
                        break;
                case BitsPointer: