diff options
Diffstat (limited to 'js/src/gc/GCRuntime.h')
-rw-r--r-- | js/src/gc/GCRuntime.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index a7198f5bbc..c9f660b4d7 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -640,6 +640,7 @@ class GCRuntime { const AutoLockHelperThreadState& lock); // Parallel marking. + bool setParallelMarkingEnabled(bool enabled); bool initOrDisableParallelMarking(); [[nodiscard]] bool updateMarkersVector(); size_t markingWorkerCount() const; @@ -799,9 +800,12 @@ class GCRuntime { ParallelMarking allowParallelMarking = SingleThreadedMarking, ShouldReportMarkTime reportTime = ReportMarkTime); bool canMarkInParallel() const; - bool initParallelMarkers(); + bool initParallelMarking(); void finishParallelMarkers(); + bool reserveMarkingThreads(size_t count); + void releaseMarkingThreads(); + bool hasMarkingWork(MarkColor color) const; void drainMarkStack(); @@ -1120,6 +1124,13 @@ class GCRuntime { /* Incremented on every GC slice. */ MainThreadData<uint64_t> sliceNumber; + /* + * This runtime's current contribution to the global number of helper threads + * 'reserved' for parallel marking. Does not affect other uses of helper + * threads. + */ + MainThreadData<size_t> reservedMarkingThreads; + /* Whether the currently running GC can finish in multiple slices. */ MainThreadOrGCTaskData<bool> isIncremental; |