• Ross McIlroy's avatar
    [SFI] Always store function_literal_id in SFI. · f92d7196
    Ross McIlroy authored
    Calling FindIndexInScript performs a linear search on the script functions and can
    take considerable time. With Bytecode flushing we will lose the function_literal_id
    and have to call FindIndexInScript if we ever recompile the flushed function. This
    can take a significant proportion of the recompilation time and has caused regressions
    in rendering times for some web applications (e.g, 395ms in FindIndexInScript for 132ms
    spent lazily re-compiling code).
    
    To avoid this, add function_literal_id back into the SFI and remove it from
    UnoptimizedCompileInfo. This will slightly regress memory usage (particularly
    in cases where many of the SFIs are compiled), however it means we can remove
    the FindIndexInScript function and avoid these long-tail regressions when
    bytecode is flushed.
    
    BUG=chromium:965833
    
    Change-Id: Ia31e82eb6c871a6d698a518326a8555822a7a1d8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1669700Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62319}
    f92d7196
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
assembler Loading commit data...
base Loading commit data...
codegen Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
date Loading commit data...
diagnostics Loading commit data...
execution Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
logging Loading commit data...
numbers Loading commit data...
objects Loading commit data...
parser Loading commit data...
profiler Loading commit data...
regress Loading commit data...
strings Loading commit data...
tasks Loading commit data...
torque Loading commit data...
utils Loading commit data...
wasm Loading commit data...
zone Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...
run-all-unittests.cc Loading commit data...
test-helpers.cc Loading commit data...
test-helpers.h Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
testcfg.py Loading commit data...
unittests.status Loading commit data...