Commit 258ae117 authored by Mythri A's avatar Mythri A Committed by Commit Bot

[gin] Add a feature flag to control lazy feedback allocation in V8

We would like to run a finch trial on this feature.

Bug: v8:8394
Change-Id: Iecac081955574c4add95627e10c3dbd5eda547c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1642640Reviewed-by: default avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666243}
parent 9c1267eb
...@@ -14,6 +14,10 @@ const base::Feature kV8OptimizeJavascript{"V8OptimizeJavascript", ...@@ -14,6 +14,10 @@ const base::Feature kV8OptimizeJavascript{"V8OptimizeJavascript",
const base::Feature kV8FlushBytecode{"V8FlushBytecode", const base::Feature kV8FlushBytecode{"V8FlushBytecode",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
// Enables lazy feedback allocation in V8.
const base::Feature kV8LazyFeedbackAllocation{"V8LazyFeedbackAllocation",
base::FEATURE_ENABLED_BY_DEFAULT};
// Enables memory reducer for small heaps in V8. // Enables memory reducer for small heaps in V8.
const base::Feature kV8MemoryReducerForSmallHeaps{ const base::Feature kV8MemoryReducerForSmallHeaps{
"V8MemoryReducerForSmallHeaps", base::FEATURE_ENABLED_BY_DEFAULT}; "V8MemoryReducerForSmallHeaps", base::FEATURE_ENABLED_BY_DEFAULT};
......
...@@ -12,6 +12,7 @@ namespace features { ...@@ -12,6 +12,7 @@ namespace features {
GIN_EXPORT extern const base::Feature kV8OptimizeJavascript; GIN_EXPORT extern const base::Feature kV8OptimizeJavascript;
GIN_EXPORT extern const base::Feature kV8FlushBytecode; GIN_EXPORT extern const base::Feature kV8FlushBytecode;
GIN_EXPORT extern const base::Feature kV8LazyFeedbackAllocation;
GIN_EXPORT extern const base::Feature kV8MemoryReducerForSmallHeaps; GIN_EXPORT extern const base::Feature kV8MemoryReducerForSmallHeaps;
GIN_EXPORT extern const base::Feature kV8HugeMaxOldGenerationSize; GIN_EXPORT extern const base::Feature kV8HugeMaxOldGenerationSize;
......
...@@ -225,6 +225,13 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode) { ...@@ -225,6 +225,13 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode) {
sizeof(no_flush_bytecode) - 1); sizeof(no_flush_bytecode) - 1);
} }
if (!base::FeatureList::IsEnabled(features::kV8LazyFeedbackAllocation)) {
static const char no_lazy_feedback_allocation[] =
"--no-lazy-feedback-allocation";
v8::V8::SetFlagsFromString(no_lazy_feedback_allocation,
sizeof(no_lazy_feedback_allocation) - 1);
}
if (!base::FeatureList::IsEnabled(features::kV8MemoryReducerForSmallHeaps)) { if (!base::FeatureList::IsEnabled(features::kV8MemoryReducerForSmallHeaps)) {
static const char no_memory_reducer[] = static const char no_memory_reducer[] =
"--no-memory-reducer-for-small-heaps"; "--no-memory-reducer-for-small-heaps";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment