Bug 1126768 - Remove more references to the conservative stack scanner r=terrence
authorJon Coppeard <jcoppeard@mozilla.com>
Thu, 29 Jan 2015 09:58:06 +0000
changeset 226539 bf503d66b2c8d3594db31e8ac44306749f311957
parent 226482 a98d16e6a3b488c51d3757b7cdb131cee9770527
child 226540 ade5e03006051c88bc52040bf685ec283e7c4ddd
push id28200
push userkwierso@gmail.com
push dateThu, 29 Jan 2015 23:01:46 +0000
treeherdermozilla-central@4380ed39de3a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1126768
milestone38.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 1126768 - Remove more references to the conservative stack scanner r=terrence
js/src/gc/GCRuntime.h
js/src/gc/Heap.h
js/src/gc/Zone.h
js/src/jsgc.h
js/src/shell/js.cpp
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -900,18 +900,16 @@ class GCRuntime
     void unprotectRelocatedArenas(ArenaHeader *relocatedList);
 #endif
     void finishCollection();
 
     void computeNonIncrementalMarkingForValidation();
     void validateIncrementalMarking();
     void finishMarkingValidation();
 
-    void markConservativeStackRoots(JSTracer *trc, bool useSavedRoots);
-
 #ifdef DEBUG
     void checkForCompartmentMismatches();
 #endif
 
     void callFinalizeCallbacks(FreeOp *fop, JSFinalizeStatus status) const;
     void callWeakPointerCallbacks() const;
 
   public:
--- a/js/src/gc/Heap.h
+++ b/js/src/gc/Heap.h
@@ -523,24 +523,22 @@ struct ArenaHeader
      * The first span of free things in the arena. We encode it as a
      * CompactFreeSpan rather than a FreeSpan to minimize the header size.
      */
     CompactFreeSpan firstFreeSpan;
 
     /*
      * One of AllocKind constants or FINALIZE_LIMIT when the arena does not
      * contain any GC things and is on the list of empty arenas in the GC
-     * chunk. The latter allows to quickly check if the arena is allocated
-     * during the conservative GC scanning without searching the arena in the
-     * list.
+     * chunk.
      *
      * We use 8 bits for the allocKind so the compiler can use byte-level memory
      * instructions to access it.
      */
-    size_t       allocKind          : 8;
+    size_t allocKind : 8;
 
     /*
      * When collecting we sometimes need to keep an auxillary list of arenas,
      * for which we use the following fields.  This happens for several reasons:
      *
      * When recursive marking uses too much stack the marking is delayed and the
      * corresponding arenas are put into a stack. To distinguish the bottom of
      * the stack from the arenas not present in the stack we use the
@@ -556,17 +554,17 @@ struct ArenaHeader
      * We set the allocatedDuringIncremental flag for this and clear it at the
      * end of the sweep phase.
      *
      * To minimize the ArenaHeader size we record the next linkage as
      * arenaAddress() >> ArenaShift and pack it with the allocKind field and the
      * flags.
      */
   public:
-    size_t       hasDelayedMarking  : 1;
+    size_t       hasDelayedMarking : 1;
     size_t       allocatedDuringIncremental : 1;
     size_t       markOverflow : 1;
     size_t       auxNextLink : JS_BITS_PER_WORD - 8 - 1 - 1 - 1;
     static_assert(ArenaShift >= 8 + 1 + 1 + 1,
                   "ArenaHeader::auxNextLink packing assumes that ArenaShift has enough bits to "
                   "cover allocKind and hasDelayedMarking.");
 
     inline uintptr_t address() const;
--- a/js/src/gc/Zone.h
+++ b/js/src/gc/Zone.h
@@ -98,19 +98,17 @@ namespace JS {
 // - Type objects and JitCode objects belong to a compartment and cannot be
 //   shared. However, there is no mechanism to obtain their compartments.
 //
 // A zone remains alive as long as any GC things in the zone are alive. A
 // compartment remains alive as long as any JSObjects, scripts, shapes, or base
 // shapes within it are alive.
 //
 // We always guarantee that a zone has at least one live compartment by refusing
-// to delete the last compartment in a live zone. (This could happen, for
-// example, if the conservative scanner marks a string in an otherwise dead
-// zone.)
+// to delete the last compartment in a live zone.
 struct Zone : public JS::shadow::Zone,
               public js::gc::GraphNodeBase<JS::Zone>,
               public js::MallocProvider<JS::Zone>
 {
     explicit Zone(JSRuntime *rt);
     ~Zone();
     bool init(bool isSystem);
 
--- a/js/src/jsgc.h
+++ b/js/src/jsgc.h
@@ -1055,19 +1055,16 @@ struct GrayRoot {
     const void *debugPrintArg;
     size_t debugPrintIndex;
 #endif
 
     GrayRoot(void *thing, JSGCTraceKind kind)
         : thing(thing), kind(kind) {}
 };
 
-void
-MarkStackRangeConservatively(JSTracer *trc, Value *begin, Value *end);
-
 typedef void (*IterateChunkCallback)(JSRuntime *rt, void *data, gc::Chunk *chunk);
 typedef void (*IterateZoneCallback)(JSRuntime *rt, void *data, JS::Zone *zone);
 typedef void (*IterateArenaCallback)(JSRuntime *rt, void *data, gc::Arena *arena,
                                      JSGCTraceKind traceKind, size_t thingSize);
 typedef void (*IterateCellCallback)(JSRuntime *rt, void *data, void *thing,
                                     JSGCTraceKind traceKind, size_t thingSize);
 
 /*
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -4421,19 +4421,19 @@ static const JSFunctionSpecWithHelp shel
 "  Garbage collection roots appear as references from 'null'. We use the name\n"
 "  given to the root (with the \"edge: \" prefix) as the name of the reference.\n"
 "\n"
 "  Note that the references object does record references from objects that are\n"
 "  only reachable via |thing| itself, not just the references reachable\n"
 "  themselves from roots that keep |thing| from being collected. (We could make\n"
 "  this distinction if it is useful.)\n"
 "\n"
-"  If any references are found by the conservative scanner, the references\n"
-"  object will have a property named \"edge: machine stack\"; the referrers will\n"
-"  be 'null', because they are roots."),
+"  If there are any references on the native stack, the references\n"
+"  object will have properties named like \"edge: exact-value \"; the referrers\n"
+"  will be 'null', because they are roots."),
 
 #endif
     JS_FN_HELP("build", BuildDate, 0, 0,
 "build()",
 "  Show build date and time."),
 
     JS_FN_HELP("intern", Intern, 1, 0,
 "intern(str)",