From 867bfbd87902a68680286ee9c52d882d854b90d3 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 19:53:53 +0200 Subject: Remove GCZeal: Base cleanup UXP repo issue #8 --- js/src/gc/GCRuntime.h | 98 --------------------------------------------------- 1 file changed, 98 deletions(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 8c9322849..d4bbe29db 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -653,19 +653,6 @@ class GCRuntime void onOutOfMallocMemory(); void onOutOfMallocMemory(const AutoLockGC& lock); -#ifdef JS_GC_ZEAL - const void* addressOfZealModeBits() { return &zealModeBits; } - void getZealBits(uint32_t* zealBits, uint32_t* frequency, uint32_t* nextScheduled); - void setZeal(uint8_t zeal, uint32_t frequency); - bool parseAndSetZeal(const char* str); - void setNextScheduled(uint32_t count); - void verifyPreBarriers(); - void maybeVerifyPreBarriers(bool always); - bool selectForMarking(JSObject* object); - void clearSelectedForMarking(); - void setDeterministic(bool enable); -#endif - size_t maxMallocBytesAllocated() { return maxMallocBytes; } uint64_t nextCellUniqueId() { @@ -851,14 +838,7 @@ class GCRuntime AutoMaybeStartBackgroundAllocation& maybeStartBGAlloc); void recycleChunk(Chunk* chunk, const AutoLockGC& lock); -#ifdef JS_GC_ZEAL - void startVerifyPreBarriers(); - void endVerifyPreBarriers(); - void finishVerifier(); - bool isVerifyPreBarriersEnabled() const { return !!verifyPreData; } -#else bool isVerifyPreBarriersEnabled() const { return false; } -#endif // Free certain LifoAlloc blocks when it is safe to do so. void freeUnusedLifoBlocksAfterSweeping(LifoAlloc* lifo); @@ -1219,10 +1199,6 @@ class GCRuntime ZoneList zonesToMaybeCompact; Arena* relocatedArenasToRelease; -#ifdef JS_GC_ZEAL - MarkingValidator* markingValidator; -#endif - /* * Indicates that a GC slice has taken place in the middle of an animation * frame, rather than at the beginning. In this case, the next slice will be @@ -1274,40 +1250,6 @@ class GCRuntime bool poked; - /* - * These options control the zealousness of the GC. At every allocation, - * nextScheduled is decremented. When it reaches zero we do a full GC. - * - * At this point, if zeal_ is one of the types that trigger periodic - * collection, then nextScheduled is reset to the value of zealFrequency. - * Otherwise, no additional GCs take place. - * - * You can control these values in several ways: - * - Set the JS_GC_ZEAL environment variable - * - Call gczeal() or schedulegc() from inside shell-executed JS code - * (see the help for details) - * - * If gcZeal_ == 1 then we perform GCs in select places (during MaybeGC and - * whenever a GC poke happens). This option is mainly useful to embedders. - * - * We use zeal_ == 4 to enable write barrier verification. See the comment - * in jsgc.cpp for more information about this. - * - * zeal_ values from 8 to 10 periodically run different types of - * incremental GC. - * - * zeal_ value 14 performs periodic shrinking collections. - */ -#ifdef JS_GC_ZEAL - uint32_t zealModeBits; - int zealFrequency; - int nextScheduled; - bool deterministicOnly; - int incrementalLimit; - - Vector selectedForMarking; -#endif - bool fullCompartmentChecks; Callback gcCallback; @@ -1415,50 +1357,10 @@ class MOZ_RAII AutoMaybeStartBackgroundAllocation } }; -#ifdef JS_GC_ZEAL - -inline bool -GCRuntime::hasZealMode(ZealMode mode) -{ - static_assert(size_t(ZealMode::Limit) < sizeof(zealModeBits) * 8, - "Zeal modes must fit in zealModeBits"); - return zealModeBits & (1 << uint32_t(mode)); -} - -inline void -GCRuntime::clearZealMode(ZealMode mode) -{ - zealModeBits &= ~(1 << uint32_t(mode)); - MOZ_ASSERT(!hasZealMode(mode)); -} - -inline bool -GCRuntime::upcomingZealousGC() { - return nextScheduled == 1; -} - -inline bool -GCRuntime::needZealousGC() { - if (nextScheduled > 0 && --nextScheduled == 0) { - if (hasZealMode(ZealMode::Alloc) || - hasZealMode(ZealMode::GenerationalGC) || - hasZealMode(ZealMode::IncrementalRootsThenFinish) || - hasZealMode(ZealMode::IncrementalMarkAllThenFinish) || - hasZealMode(ZealMode::IncrementalMultipleSlices) || - hasZealMode(ZealMode::Compact)) - { - nextScheduled = zealFrequency; - } - return true; - } - return false; -} -#else inline bool GCRuntime::hasZealMode(ZealMode mode) { return false; } inline void GCRuntime::clearZealMode(ZealMode mode) { } inline bool GCRuntime::upcomingZealousGC() { return false; } inline bool GCRuntime::needZealousGC() { return false; } -#endif } /* namespace gc */ -- cgit v1.2.3 From 3ff383eaecedb3e86006704822a408daa20e3ccc Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 22:51:31 +0200 Subject: Remove isVerifyPreBarriersEnabled() stub and callers --- js/src/gc/GCRuntime.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index d4bbe29db..5252903f3 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -838,8 +838,6 @@ class GCRuntime AutoMaybeStartBackgroundAllocation& maybeStartBGAlloc); void recycleChunk(Chunk* chunk, const AutoLockGC& lock); - bool isVerifyPreBarriersEnabled() const { return false; } - // Free certain LifoAlloc blocks when it is safe to do so. void freeUnusedLifoBlocksAfterSweeping(LifoAlloc* lifo); void freeAllLifoBlocksAfterSweeping(LifoAlloc* lifo); -- cgit v1.2.3 From 6f342b2269e769a27dd0476cc4dc8a9c93c20235 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 23:08:26 +0200 Subject: Remove hasZealMode(mode) and callers --- js/src/gc/GCRuntime.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 5252903f3..a426d759b 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -600,7 +600,6 @@ class GCRuntime void finishRoots(); void finish(); - inline bool hasZealMode(ZealMode mode); inline void clearZealMode(ZealMode mode); inline bool upcomingZealousGC(); inline bool needZealousGC(); @@ -1355,7 +1354,6 @@ class MOZ_RAII AutoMaybeStartBackgroundAllocation } }; -inline bool GCRuntime::hasZealMode(ZealMode mode) { return false; } inline void GCRuntime::clearZealMode(ZealMode mode) { } inline bool GCRuntime::upcomingZealousGC() { return false; } inline bool GCRuntime::needZealousGC() { return false; } -- cgit v1.2.3 From 7a59ec756adc8fc4d394b221abcba5757c030f6d Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 23:10:53 +0200 Subject: Remove clearZealMode(mode) --- js/src/gc/GCRuntime.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index a426d759b..2cad0b3b3 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -600,7 +600,6 @@ class GCRuntime void finishRoots(); void finish(); - inline void clearZealMode(ZealMode mode); inline bool upcomingZealousGC(); inline bool needZealousGC(); @@ -1354,7 +1353,6 @@ class MOZ_RAII AutoMaybeStartBackgroundAllocation } }; -inline void GCRuntime::clearZealMode(ZealMode mode) { } inline bool GCRuntime::upcomingZealousGC() { return false; } inline bool GCRuntime::needZealousGC() { return false; } -- cgit v1.2.3 From 95badd197469e377bbed2319b8c5ee1e9581fa12 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 23:13:01 +0200 Subject: Remove upcomingZealousGC() and caller --- js/src/gc/GCRuntime.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 2cad0b3b3..cc558c2db 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -600,7 +600,6 @@ class GCRuntime void finishRoots(); void finish(); - inline bool upcomingZealousGC(); inline bool needZealousGC(); MOZ_MUST_USE bool addRoot(Value* vp, const char* name); @@ -1353,7 +1352,6 @@ class MOZ_RAII AutoMaybeStartBackgroundAllocation } }; -inline bool GCRuntime::upcomingZealousGC() { return false; } inline bool GCRuntime::needZealousGC() { return false; } } /* namespace gc */ -- cgit v1.2.3 From 548e31e1ed8512662d8c0676bd059766e884be8e Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 23:14:55 +0200 Subject: Remove needZealousGC() --- js/src/gc/GCRuntime.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index cc558c2db..0e6969055 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -600,8 +600,6 @@ class GCRuntime void finishRoots(); void finish(); - inline bool needZealousGC(); - MOZ_MUST_USE bool addRoot(Value* vp, const char* name); void removeRoot(Value* vp); void setMarkStackLimit(size_t limit, AutoLockGC& lock); @@ -1352,8 +1350,6 @@ class MOZ_RAII AutoMaybeStartBackgroundAllocation } }; -inline bool GCRuntime::needZealousGC() { return false; } - } /* namespace gc */ } /* namespace js */ -- cgit v1.2.3 From 93e6b657d10e5c74d0cc07cb59095cab8041be9c Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 23:43:05 +0200 Subject: Remove computeNonIncrementalMarkingForValidation(lock) and caller --- js/src/gc/GCRuntime.h | 1 - 1 file changed, 1 deletion(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 0e6969055..b1b4ffcba 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -977,7 +977,6 @@ class GCRuntime void releaseRelocatedArenasWithoutUnlocking(Arena* arenaList, const AutoLockGC& lock); void finishCollection(JS::gcreason::Reason reason); - void computeNonIncrementalMarkingForValidation(AutoLockForExclusiveAccess& lock); void validateIncrementalMarking(); void finishMarkingValidation(); -- cgit v1.2.3 From da7e96fc7ae070e390eb05dae02e70f98d109d2c Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 23:45:04 +0200 Subject: Remove validateIncrementalMarking() and caller --- js/src/gc/GCRuntime.h | 1 - 1 file changed, 1 deletion(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index b1b4ffcba..872e649fa 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -977,7 +977,6 @@ class GCRuntime void releaseRelocatedArenasWithoutUnlocking(Arena* arenaList, const AutoLockGC& lock); void finishCollection(JS::gcreason::Reason reason); - void validateIncrementalMarking(); void finishMarkingValidation(); #ifdef DEBUG -- cgit v1.2.3 From 6b289446151b6c672e33a5de4f97edf9e83b27a9 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 23:55:48 +0200 Subject: Remove finishMarkingValidation and caller --- js/src/gc/GCRuntime.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 872e649fa..638bd18c7 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -977,8 +977,6 @@ class GCRuntime void releaseRelocatedArenasWithoutUnlocking(Arena* arenaList, const AutoLockGC& lock); void finishCollection(JS::gcreason::Reason reason); - void finishMarkingValidation(); - #ifdef DEBUG void checkForCompartmentMismatches(); #endif -- cgit v1.2.3 From d184e493d92de8a99adb83a0fe34f90f576b064c Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 26 Jun 2017 23:57:55 +0200 Subject: Remove pushZealSelectedObjects() and caller --- js/src/gc/GCRuntime.h | 1 - 1 file changed, 1 deletion(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 638bd18c7..ae4f03cea 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -921,7 +921,6 @@ class GCRuntime void incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason reason, AutoLockForExclusiveAccess& lock); - void pushZealSelectedObjects(); void purgeRuntime(AutoLockForExclusiveAccess& lock); MOZ_MUST_USE bool beginMarkPhase(JS::gcreason::Reason reason, AutoLockForExclusiveAccess& lock); bool shouldPreserveJITCode(JSCompartment* comp, int64_t currentTime, -- cgit v1.2.3 From f7352531b6f7442278bb8a7b95385db05ba4ae3c Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 27 Jun 2017 00:00:57 +0200 Subject: Remove runDebugGC() stub --- js/src/gc/GCRuntime.h | 1 - 1 file changed, 1 deletion(-) (limited to 'js/src/gc/GCRuntime.h') diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index ae4f03cea..19737c9ee 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -633,7 +633,6 @@ class GCRuntime MOZ_RELEASE_ASSERT(triggerGC(JS::gcreason::ALLOC_TRIGGER)); } - void runDebugGC(); inline void poke(); enum TraceOrMarkRuntime { -- cgit v1.2.3