Commit 400b2cc2 authored by Seth Brenith's avatar Seth Brenith Committed by V8 LUCI CQ

Don't rescue old top-level SharedFunctionInfos

My previous change https://crrev.com/c/3597106 led to some performance
regressions in time spent on parsing and compilation. Those regressions
might be due to increasing the reuse of old top-level
SharedFunctionInfos. If the top-level SFI is old enough that its
bytecode can be flushed, then perhaps other SFIs within the script have
already been flushed. In that case, discarding information from a
background compilation or code cache deserialization could be harmful.

Bug: v8:12808, chromium:1325566, chromium:1325567, chromium:1325601
Change-Id: Ia7651bed86eecdbef8878e6132b894ed10163cdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3657472
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80697}
parent d4ce844b
......@@ -301,7 +301,7 @@ CompilationCacheScriptLookupResult CompilationCacheTable::LookupScript(
if (!obj.IsUndefined(isolate)) {
toplevel_sfi = SharedFunctionInfo::cast(obj);
DCHECK_EQ(toplevel_sfi.script(), script);
} else {
} else if (FLAG_isolate_script_cache_recompilation) {
// Even though this cache no longer holds a strong reference to the root
// SharedFunctionInfo for the Script, the root SharedFunctionInfo may still
// exist. If it exists and is already compiled, then we should place it back
......
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