Commit 3329cbc8 authored by Mythri A's avatar Mythri A Committed by Commit Bot

Enable FLAG_feedback_allocation_on_bytecode_size

This flag enables feedback allocation heuristics to be based on the
function size. The threshold for feedback allocation is set to
12 * bytecode size to roughly mimic the allocation after 12 invocations.

We tried 4 * bytecode size earlier and there were few memory regressions
on real world pages. Speedometer improved by ~1% [1, 2]. This time
trying with a higher factor this time to see if we still have
speedometer improvements without any memory regressions.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1177124
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=1177241

Change-Id: I39c7d4aaf90b948b07419e4598e2193b8355c067
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752150
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73369}
parent 7a957510
......@@ -517,9 +517,9 @@ DEFINE_BOOL(use_ic, true, "use inline caching")
DEFINE_INT(budget_for_feedback_vector_allocation, 940,
"The budget in amount of bytecode executed by a function before we "
"decide to allocate feedback vectors")
DEFINE_INT(scale_factor_for_feedback_allocation, 4,
DEFINE_INT(scale_factor_for_feedback_allocation, 12,
"scale bytecode size for feedback vector allocation.")
DEFINE_BOOL(feedback_allocation_on_bytecode_size, false,
DEFINE_BOOL(feedback_allocation_on_bytecode_size, true,
"Instead of a fixed budget for lazy feedback vector allocation, "
"scale it based in the bytecode size.")
DEFINE_IMPLICATION(sparkplug, feedback_allocation_on_bytecode_size)
......
......@@ -27,7 +27,7 @@
// Flags: --allow-natives-syntax --nostress-opt --opt
// Flags: --no-stress-flush-bytecode
// Flags: --no-stress-flush-bytecode --no-lazy-feedback-allocation
function test(f, iterations) {
%PrepareFunctionForOptimization(f);
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --opt
// Flags: --allow-natives-syntax --opt --no-lazy-feedback-allocation
var global;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --opt
// Flags: --allow-natives-syntax --opt --no-lazy-feedback-allocation
function TestSetWithCustomIterator(ctor) {
const k1 = {};
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --opt
// Flags: --allow-natives-syntax --opt --no-lazy-feedback-allocation
function TestSetPrototypeModified(ctor) {
const originalPrototypeAdd = ctor.prototype.add;
......
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