Skip to content

Commit

Permalink
runtime: don't stop bitmap dump at BitsDead
Browse files Browse the repository at this point in the history
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
  • Loading branch information
randall77 committed Nov 6, 2014
1 parent 6ad16c4 commit 5b110c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runtime/heapdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5b110c7

Please sign in to comment.