Remove script-ablation code

The script ablation study was never pushed to stable.
The preliminary numbers showed non-monotic behavior for high-level
metrics for initial script delays < 250ms.

Depends on code removal in chrome: https://crrev.com/c/4189106

Bug: chromium:1193459
Change-Id: I96540937768566d243a1bfd94234c3dd1b35a77d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4188389
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85547}
This commit is contained in:
Camillo Bruni 2023-01-24 10:18:46 +01:00 committed by V8 LUCI CQ
parent 7f3574e01c
commit 8e8492b1a2
3 changed files with 0 additions and 37 deletions

View File

@ -2226,26 +2226,6 @@ MaybeLocal<Value> Script::Run(Local<Context> context,
#endif
auto fun = i::Handle<i::JSFunction>::cast(Utils::OpenHandle(this));
// TODO(crbug.com/1193459): remove once ablation study is completed
base::ElapsedTimer timer;
base::TimeDelta delta;
if (i::v8_flags.script_delay > 0) {
delta = v8::base::TimeDelta::FromMillisecondsD(i::v8_flags.script_delay);
}
if (i::v8_flags.script_delay_once > 0 && !i_isolate->did_run_script_delay()) {
delta =
v8::base::TimeDelta::FromMillisecondsD(i::v8_flags.script_delay_once);
i_isolate->set_did_run_script_delay(true);
}
if (i::v8_flags.script_delay_fraction > 0.0) {
timer.Start();
} else if (delta.InMicroseconds() > 0) {
timer.Start();
while (timer.Elapsed() < delta) {
// Busy wait.
}
}
if (V8_UNLIKELY(i::v8_flags.experimental_web_snapshots)) {
i::Handle<i::HeapObject> maybe_script =
handle(fun->shared().script(), i_isolate);
@ -2270,15 +2250,6 @@ MaybeLocal<Value> Script::Run(Local<Context> context,
has_pending_exception = !ToLocal<Value>(
i::Execution::CallScript(i_isolate, fun, receiver, options), &result);
if (i::v8_flags.script_delay_fraction > 0.0) {
delta = v8::base::TimeDelta::FromMillisecondsD(
timer.Elapsed().InMillisecondsF() * i::v8_flags.script_delay_fraction);
timer.Restart();
while (timer.Elapsed() < delta) {
// Busy wait.
}
}
RETURN_ON_FAILED_EXECUTION(Value);
RETURN_ESCAPED(result);
}

View File

@ -540,8 +540,6 @@ using DebugObjectCache = std::vector<Handle<HeapObject>>;
V(int, embedder_wrapper_type_index, -1) \
V(int, embedder_wrapper_object_index, -1) \
V(compiler::NodeObserver*, node_observer, nullptr) \
/* Used in combination with --script-run-delay-once */ \
V(bool, did_run_script_delay, false) \
V(bool, javascript_execution_assert, true) \
V(bool, javascript_execution_throws, true) \
V(bool, javascript_execution_dump, true) \

View File

@ -997,12 +997,6 @@ DEFINE_BOOL(turbo_collect_feedback_in_generic_lowering, false,
DEFINE_BOOL(isolate_script_cache_ageing, true,
"enable ageing of the isolate script cache.")
DEFINE_FLOAT(script_delay, 0, "busy wait [ms] on every Script::Run")
DEFINE_FLOAT(script_delay_once, 0, "busy wait [ms] on the first Script::Run")
DEFINE_FLOAT(script_delay_fraction, 0.0,
"busy wait after each Script::Run by the given fraction of the "
"run's duration")
DEFINE_BOOL(turboshaft, false, "enable TurboFan's Turboshaft phases for JS")
DEFINE_BOOL(turboshaft_trace_reduction, false,
"trace individual Turboshaft reduction steps")