From: Dmitriy Vyukov Date: Tue, 11 Mar 2014 13:33:03 +0000 (+0400) Subject: runtime: wipe out bitSpecial from GC code X-Git-Tag: go1.3beta1~401 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=38f6c3f59d590052b43ed71a2350485bdc76ef3e;p=gostls13.git runtime: wipe out bitSpecial from GC code LGTM=khr, rsc R=golang-codereviews, bradfitz, khr CC=golang-codereviews, khr, rsc https://golang.org/cl/72480044 --- diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c index 389d0062aa..3c74417893 100644 --- a/src/pkg/runtime/mgc0.c +++ b/src/pkg/runtime/mgc0.c @@ -154,7 +154,7 @@ clearpools(void) // so on a 64-bit system there is one bitmap word per 16 heap words. // The bits in the word are packed together by type first, then by // heap location, so each 64-bit bitmap word consists of, from top to bottom, -// the 16 bitSpecial bits for the corresponding heap words, then the 16 bitMarked bits, +// the 16 bitMarked bits for the corresponding heap words, // then the 16 bitScan/bitBlockBoundary bits, then the 16 bitAllocated bits. // This layout makes it easier to iterate over the bits of a given type. // @@ -174,10 +174,9 @@ clearpools(void) #define bitAllocated ((uintptr)1<<(bitShift*0)) /* block start; eligible for garbage collection */ #define bitScan ((uintptr)1<<(bitShift*1)) /* when bitAllocated is set */ #define bitMarked ((uintptr)1<<(bitShift*2)) /* when bitAllocated is set */ -#define bitSpecial ((uintptr)1<<(bitShift*3)) /* when bitAllocated is set - has finalizer or being profiled */ #define bitBlockBoundary ((uintptr)1<<(bitShift*1)) /* when bitAllocated is NOT set - mark for FlagNoGC objects */ -#define bitMask (bitAllocated | bitScan | bitMarked | bitSpecial) +#define bitMask (bitAllocated | bitScan | bitMarked) // Holding worldsema grants an M the right to try to stop the world. // The procedure is: @@ -1805,8 +1804,8 @@ runtime·MSpan_Sweep(MSpan *s) continue; } - // Clear mark, scan, and special bits. - *bitp &= ~((bitScan|bitMarked|bitSpecial)<state != MSpanInUse) @@ -1980,7 +1979,6 @@ dumpspan(uint32 idx) bits = *bitp>>shift; allocated = ((bits & bitAllocated) != 0); - special = ((bits & bitSpecial) != 0); for(i=0; i