Bug 921178 - Remove unused fallback marking bitmap; r=billm
authorTerrence Cole <terrence@mozilla.com>
Mon, 30 Sep 2013 14:58:12 -0700
changeset 149387 b6c4a0e729308187e72a6f742a720e1415259328
parent 149386 486c4d2bfe20206da462cc6163235f4b2c5ecd01
child 149388 1e6a27764acd0f9170d561f2a5748d0e7b74515f
push id25386
push useremorley@mozilla.com
push dateTue, 01 Oct 2013 09:29:22 +0000
treeherdermozilla-central@6856c45f3688 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs921178
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 921178 - Remove unused fallback marking bitmap; r=billm
js/src/gc/Nursery.cpp
js/src/gc/Nursery.h
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -29,18 +29,16 @@ using namespace mozilla;
 bool
 js::Nursery::init()
 {
     JS_ASSERT(start() == 0);
 
     if (!hugeSlots.init())
         return false;
 
-    fallbackBitmap.clear(false);
-
     void *heap = MapAlignedPages(runtime(), NurserySize, Alignment);
 #ifdef JSGC_ROOT_ANALYSIS
     // Our poison pointers are not guaranteed to be invalid on 64-bit
     // architectures, and often are valid. We can't just reserve the full
     // poison range, because it might already have been taken up by something
     // else (shared library, previous allocation). So we'll just loop and
     // discard poison pointers until we get something valid.
     //
@@ -92,18 +90,16 @@ js::Nursery::disable()
     JS_ASSERT(position_ == start());
     numActiveChunks_ = 0;
     currentEnd_ = 0;
 }
 
 void *
 js::Nursery::allocate(size_t size)
 {
-    JS_ASSERT(size % ThingAlignment == 0);
-    JS_ASSERT(position() % ThingAlignment == 0);
     JS_ASSERT(!runtime()->isHeapBusy());
 
     if (position() + size > currentEnd()) {
         if (currentChunk_ + 1 == numActiveChunks_)
             return nullptr;
         setCurrentChunk(currentChunk_ + 1);
     }
 
--- a/js/src/gc/Nursery.h
+++ b/js/src/gc/Nursery.h
@@ -132,21 +132,16 @@ class Nursery
     /*
      * The set of externally malloced slots potentially kept live by objects
      * stored in the nursery. Any external slots that do not belong to a
      * tenured thing at the end of a minor GC must be freed.
      */
     typedef HashSet<HeapSlot *, PointerHasher<HeapSlot *, 3>, SystemAllocPolicy> HugeSlotsSet;
     HugeSlotsSet hugeSlots;
 
-    /* The marking bitmap for the fallback marker. */
-    static const size_t ThingAlignment = sizeof(JS::Value);
-    static const size_t FallbackBitmapBits = NurserySize / ThingAlignment;
-    BitArray<FallbackBitmapBits> fallbackBitmap;
-
 #ifdef DEBUG
     /*
      * In DEBUG builds, these bytes indicate the state of an unused segment of
      * nursery-allocated memory.
      */
     static const uint8_t FreshNursery = 0x2a;
     static const uint8_t SweptNursery = 0x2b;
     static const uint8_t AllocatedThing = 0x2c;