From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- js/src/vm/HelperThreadState.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'js/src/vm/HelperThreadState.h') diff --git a/js/src/vm/HelperThreadState.h b/js/src/vm/HelperThreadState.h index 8e601a385c..a43efef7af 100644 --- a/js/src/vm/HelperThreadState.h +++ b/js/src/vm/HelperThreadState.h @@ -26,13 +26,12 @@ #include // uint32_t, uint64_t #include // std::move -#include "ds/Fifo.h" // Fifo -#include "frontend/CompilationStencil.h" // frontend::CompilationStencil -#include "gc/GCRuntime.h" // gc::GCRuntime -#include "js/AllocPolicy.h" // SystemAllocPolicy -#include "js/CompileOptions.h" // JS::ReadOnlyCompileOptions -#include "js/experimental/CompileScript.h" // JS::CompilationStorage -#include "js/experimental/JSStencil.h" // JS::InstantiationStorage +#include "ds/Fifo.h" // Fifo +#include "frontend/CompilationStencil.h" // frontend::CompilationStencil +#include "gc/GCRuntime.h" // gc::GCRuntime +#include "js/AllocPolicy.h" // SystemAllocPolicy +#include "js/CompileOptions.h" // JS::ReadOnlyCompileOptions +#include "js/experimental/JSStencil.h" // JS::InstantiationStorage #include "js/HelperThreadAPI.h" // JS::HelperThreadTaskCallback, JS::DispatchReason #include "js/MemoryMetrics.h" // JS::GlobalStats #include "js/ProfilingStack.h" // JS::RegisterThreadCallback, JS::UnregisterThreadCallback @@ -115,13 +114,19 @@ class GlobalHelperThreadState { PromiseHelperTaskVector; // Count of running task by each threadType. - mozilla::EnumeratedArray + mozilla::EnumeratedArray runningTaskCount; size_t totalCountRunningTasks; WriteOnceData registerThread; WriteOnceData unregisterThread; + // Count of helper threads 'reserved' for parallel marking. This is used to + // prevent too many runtimes trying to mark in parallel at once. Does not stop + // threads from being used for other kinds of task, including GC tasks. + HelperThreadLockData gcParallelMarkingThreads; + private: // The lists below are all protected by |lock|. -- cgit v1.2.3