diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /js/src/vm/HelperThreadState.h | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/vm/HelperThreadState.h')
-rw-r--r-- | js/src/vm/HelperThreadState.h | 21 |
1 files changed, 13 insertions, 8 deletions
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 <stdint.h> // uint32_t, uint64_t #include <utility> // 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<ThreadType, ThreadType::THREAD_TYPE_MAX, size_t> + mozilla::EnumeratedArray<ThreadType, size_t, + size_t(ThreadType::THREAD_TYPE_MAX)> runningTaskCount; size_t totalCountRunningTasks; WriteOnceData<JS::RegisterThreadCallback> registerThread; WriteOnceData<JS::UnregisterThreadCallback> 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<size_t> gcParallelMarkingThreads; + private: // The lists below are all protected by |lock|. |