• Clemens Backes's avatar
    [wasm][debug] Support multi-threaded breakpoints · 5fcb414a
    Clemens Backes authored
    This adds support for multiple isolates sharing the same module but
    setting different breakpoints. This is simulated by having a debugger
    test that runs in the "--isolates" variant, i.e. two isolates running
    the same test at the same time. Both isolates will set and remove
    breakpoints.
    
    The DebugInfo will keep a separate list of breakpoints per isolate, and
    when recompiling a function for debugging it will respect all
    breakpoints in all isolates.
    In order to ensure consistency if multiple isolates are setting or
    removing breakpoints simultaneously, we go back to a more coarse-grained
    locking scheme, where the DebugInfo lock is held while re-compiling
    Liftoff functions.
    
    While recompilation will install the code in the module-global code
    table and jump table (and hence all isolates will use it for future
    calls), only the stack of the requesting isolate is rewritten to
    immediately use new code. This is OK, because other isolates are not
    interested in the new breakpoint(s) anyway.
    On {SetBreakpoint}, we always need to rewrite the stack of the
    requesting isolate though, even if the breakpoint was set before by
    another isolate.
    
    Drive-by: Some fixes in SharedFunctionInfo in order to support setting
    breakpoints via the Debug mirror.
    
    R=thibaudm@chromium.org
    
    Bug: v8:10359
    Change-Id: If659afb273260fc5e8124b4b617fb4322de473c7
    Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
    Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218059Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68096}
    5fcb414a
Name
Last commit
Last update
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...
.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...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS 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...
LICENSE.valgrind 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...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...