Skip to content

Commit

Permalink
Add a feature flag for reducing the number of concurrent marking tasks
Browse files Browse the repository at this point in the history
The V8ReduceConcurrentMarkingTasks flag will be used in Finch experiment.

Bug: v8:10442
Change-Id: I2cb6d0a8445f4eeb9fcbad9ecb8595542d50fc8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2283219
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786242}
  • Loading branch information
ulan authored and Commit Bot committed Jul 8, 2020
1 parent 321ad9b commit 1e41d4d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gin/gin_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,20 @@ const base::Feature kV8OffThreadFinalization{"V8OffThreadFinalization",
const base::Feature kV8LazyFeedbackAllocation{"V8LazyFeedbackAllocation",
base::FEATURE_ENABLED_BY_DEFAULT};

// Enable concurrent inlining in TurboFan.
// Enables concurrent inlining in TurboFan.
const base::Feature kV8ConcurrentInlining{"V8ConcurrentInlining",
base::FEATURE_DISABLED_BY_DEFAULT};

// Enable per-context marking worklists in V8 GC.
// Enables per-context marking worklists in V8 GC.
const base::Feature kV8PerContextMarkingWorklist{
"V8PerContextMarkingWorklist", base::FEATURE_DISABLED_BY_DEFAULT};

// Enable flushing of the instruction cache for the embedded blob.
// Enables flushing of the instruction cache for the embedded blob.
const base::Feature kV8FlushEmbeddedBlobICache{
"kV8FlushEmbeddedBlobICache", base::FEATURE_DISABLED_BY_DEFAULT};

// Enables reduced number of concurrent marking tasks.
const base::Feature kV8ReduceConcurrentMarkingTasks{
"kV8ReduceConcurrentMarkingTasks", base::FEATURE_DISABLED_BY_DEFAULT};

} // namespace features
1 change: 1 addition & 0 deletions gin/gin_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ GIN_EXPORT extern const base::Feature kV8LazyFeedbackAllocation;
GIN_EXPORT extern const base::Feature kV8ConcurrentInlining;
GIN_EXPORT extern const base::Feature kV8PerContextMarkingWorklist;
GIN_EXPORT extern const base::Feature kV8FlushEmbeddedBlobICache;
GIN_EXPORT extern const base::Feature kV8ReduceConcurrentMarkingTasks;

} // namespace features

Expand Down
8 changes: 8 additions & 0 deletions gin/v8_initializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode) {
sizeof(experimental_flush_embedded_blob_icache) - 1);
}

if (base::FeatureList::IsEnabled(features::kV8ReduceConcurrentMarkingTasks)) {
static const char gc_experiment_reduce_concurrent_marking_tasks[] =
"--gc-experiment-reduce-concurrent-marking-tasks";
v8::V8::SetFlagsFromString(
gc_experiment_reduce_concurrent_marking_tasks,
sizeof(gc_experiment_reduce_concurrent_marking_tasks) - 1);
}

if (IsolateHolder::kStrictMode == mode) {
static const char use_strict[] = "--use_strict";
v8::V8::SetFlagsFromString(use_strict, sizeof(use_strict) - 1);
Expand Down

0 comments on commit 1e41d4d

Please sign in to comment.