• Benedikt Meurer's avatar
    [debug] Lazily lookup source positions for StackFrameInfo. · 2ffc79b7
    Benedikt Meurer authored
    This changes the StackFrameInfo to either hold on to a pair of
    
      (Script,source position)
    
    or a pair of
    
      (SharedFunctioInfo,bytecode offset)
    
    similar to what we do for MessageLocation. The idea here is to defer the
    costly bytecode offset to source position lookup until really needed,
    and in particular, avoid the costly lookup during stack trace capturing.
    
    On the `standalone.js` benchmark in crbug.com/1283162#c1, this reduces
    overall average execution time by roughly 25%, and the performance is
    almost back to where it was before crrev.com/c/3302794 (being only 12%
    slower than before on the `standalone.js` test case).
    
    Note that due to unrelated limitations we cannot encode -1 as bytecode
    offset in the flags field of the StackFrameInfo, and so we treat this
    case specially (happens when stack trace capturing is triggered in the
    function entry sequence) and just eagerly resolve it to the source
    position.
    
    Bug: chromium:1278650, chromium:1283162, chromium:1280803
    Bug: chromium:1280818, chromium:1280831, chromium:1280832
    Doc: https://bit.ly/v8-cheaper-inspector-stack-traces
    Change-Id: If7cf62fce48d32c0f188895d1f8c9eee51b9e70d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3359633Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78466}
    2ffc79b7
Name
Last commit
Last update
.github Loading commit data...
bazel Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.bazelrc Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.mailmap Loading commit data...
.vpython Loading commit data...
.vpython3 Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.bazel Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
DIR_METADATA Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LOONG_OWNERS Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
RISCV_OWNERS Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
WORKSPACE Loading commit data...
codereview.settings Loading commit data...