Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Issue 2096863003: [wasm] prototype for breakpoint support. (Closed)

Created:
4 years, 6 months ago by Clemens Hammacher
Modified:
3 years, 11 months ago
Reviewers:
CC:
v8-reviews_googlegroups.com, Yang
Base URL:
https://chromium.googlesource.com/v8/v8.git@extend-script-functionality
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] prototype for breakpoint support. This CL touches several things: - It instantiates a WasmInterpreter on demand, with a weak reference to the WasmDebugInfo object, such that it gets deleted when the debug info goes away. - It compiles WASM_TO_INTERPRETER code stubs on demand, and redirect wasm callers to these stubs. - It adds a new code kind WASM_TO_INTERPRETER for those stubs. - It adds a new frame type WASM_INTERPRETED, which is used when WASM_TO_INTERPRETER code is found to be executed in a frame. - It adds frame inspection for this new frame type by looking into the state of the interpreter. This uses the same Frame::Summarize mechanism as optimized JS frames. - It adds a WasmBytecodeIterator which enumerates all instruction locations inside a wasm function. - It allocates a DebugInfo object per wasm function on demand, to store breakpoint information. - It fixes the WasmInterpreter to only allow setting breakpoints on actual instruction offsets; the current implementation just overwrites an arbitrary byte in the function by kInternalBreakpoint. Before being committed, it needs to be split up though, and a memory error (showing up in GC stress tests) still has to be tracked down and eliminated. BUG=chromium:613110

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1641 lines, -388 lines) Patch
M src/compiler.cc View 1 chunk +3 lines, -1 line 0 comments Download
M src/compiler/wasm-compiler.h View 2 chunks +8 lines, -0 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 2 chunks +162 lines, -0 lines 0 comments Download
M src/debug/debug.h View 4 chunks +22 lines, -4 lines 0 comments Download
M src/debug/debug.cc View 16 chunks +148 lines, -60 lines 0 comments Download
M src/debug/debug-frames.h View 2 chunks +5 lines, -5 lines 0 comments Download
M src/debug/debug-frames.cc View 6 chunks +57 lines, -45 lines 0 comments Download
M src/debug/debug-scopes.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/deoptimizer.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/deoptimizer.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M src/factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/factory.cc View 1 chunk +15 lines, -9 lines 0 comments Download
M src/frames.h View 10 chunks +92 lines, -19 lines 0 comments Download
M src/frames.cc View 8 chunks +144 lines, -24 lines 0 comments Download
M src/frames-inl.h View 3 chunks +31 lines, -1 line 0 comments Download
M src/isolate.cc View 4 chunks +95 lines, -103 lines 0 comments Download
M src/log.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.h View 3 chunks +6 lines, -1 line 0 comments Download
M src/objects-debug.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/objects-inl.h View 1 chunk +12 lines, -1 line 0 comments Download
M src/runtime/runtime.h View 1 chunk +3 lines, -1 line 0 comments Download
M src/runtime/runtime-debug.cc View 13 chunks +44 lines, -31 lines 0 comments Download
M src/snapshot/code-serializer.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/wasm/wasm-debug.h View 2 chunks +94 lines, -2 lines 0 comments Download
M src/wasm/wasm-debug.cc View 7 chunks +401 lines, -5 lines 0 comments Download
M src/wasm/wasm-external-refs.h View 2 chunks +5 lines, -0 lines 0 comments Download
M src/wasm/wasm-interpreter.h View 5 chunks +17 lines, -17 lines 0 comments Download
M src/wasm/wasm-interpreter.cc View 9 chunks +84 lines, -39 lines 0 comments Download
M src/wasm/wasm-module.h View 2 chunks +7 lines, -1 line 0 comments Download
M src/wasm/wasm-module.cc View 3 chunks +17 lines, -2 lines 0 comments Download
M test/cctest/wasm/test-run-wasm-interpreter.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M test/cctest/wasm/wasm-run-utils.h View 3 chunks +4 lines, -2 lines 0 comments Download
A test/mjsunit/wasm/debug-break.js View 1 chunk +153 lines, -0 lines 0 comments Download

Depends on Patchset:

Powered by Google App Engine
This is Rietveld 408576698