- 24 Sep, 2021 1 commit
-
-
Andreas Haas authored
NameSectionKindCode::kFunction got shadowed by WasmCompilationResult::Kind::kFunction. NameSectionKindCode is not used often, so this CL just adds "Code" to all fields of this enum. R=clemensb@chromium.org Bug: v8:12244 Change-Id: I87155a43084b868f6c118ddc2e44cb9c35b4249b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181535Reviewed-by:
Clemens Backes <clemensb@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#77049}
-
- 04 Aug, 2021 1 commit
-
-
Clemens Backes authored
The number of arguments for the LiftoffCompiler has grown significantly since its initial implementation, and it becomes hard to keep track of all options at the call sites. This CL refactors all optional parameters into a {LiftoffOptions} struct which has a factory-like interface. This will allow us to add more options in the future, e.g. for dynamic tiering. R=thibaudm@chromium.org Change-Id: I66697bb2f99b676a84c158304cc3a285e1b077d0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3069148 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#76098}
-
- 14 Jul, 2021 1 commit
-
-
Benedikt Meurer authored
Previously we had passed kOnEntryBreakpointPosition as a marker through the regular SetBreakPointForScript() logic and handled that specially in WasmScript, however this instrumentation breakpoint is special and gets in the way of returning more information about a regular breakpoint in case of crbug.com/700516, so I decided to just isolate that into it's own method, especially since the only user already special-cases Wasm anyways. Bug: chromium:1162229, chromium:700516 Change-Id: Ie7966c1701365a4b03710d6dc32cc8278577ee3a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3026711 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#75724}
-
- 22 Jun, 2021 1 commit
-
-
Clemens Backes authored
This is a reland of 0f90a2aa. The issue was inverted destructor order between WasmCodeManager and WasmEngine. WasmEngine has to be destructed first, because it contains a barrier to ensure that background compile threads finished before global state is being destructed. Original change's description: > [wasm] Provide a global WasmCodeManager > > The WasmCodeManager was part of the WasmEngine so far, but there is only > exactly one WasmEngine. Hence we can pull it out, and also remove the > pointer in the WasmCodeAllocator. > > The argument passed from the single constructor call is now inlined in > the constructor itself. > > Drive-by: Replace "GetPlatformPageAllocator()->CommitPageSize()" by just > "CommitPageSize()". > > R=jkummerow@chromium.org > > Bug: v8:11879 > Change-Id: I6c0e74cea308f5806d1aa479945d90b6ef8d1613 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972909 > Commit-Queue: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Cr-Commit-Position: refs/heads/master@{#75270} Bug: v8:11879 Change-Id: I0eaa2395f5c1e30f3f7303c5f3df70c227b74d3d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2975859 Auto-Submit: Clemens Backes <clemensb@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75289}
-
- 21 Jun, 2021 3 commits
-
-
Maya Lekova authored
This reverts commit 0f90a2aa. Reason for revert: Breaks MSAN, please see https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/38941/overview Original change's description: > [wasm] Provide a global WasmCodeManager > > The WasmCodeManager was part of the WasmEngine so far, but there is only > exactly one WasmEngine. Hence we can pull it out, and also remove the > pointer in the WasmCodeAllocator. > > The argument passed from the single constructor call is now inlined in > the constructor itself. > > Drive-by: Replace "GetPlatformPageAllocator()->CommitPageSize()" by just > "CommitPageSize()". > > R=jkummerow@chromium.org > > Bug: v8:11879 > Change-Id: I6c0e74cea308f5806d1aa479945d90b6ef8d1613 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972909 > Commit-Queue: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Cr-Commit-Position: refs/heads/master@{#75270} Bug: v8:11879 Change-Id: I110eec313762d73073f530aec7cf0be82c4db344 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972921 Auto-Submit: Maya Lekova <mslekova@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#75274}
-
Clemens Backes authored
The WasmCodeManager was part of the WasmEngine so far, but there is only exactly one WasmEngine. Hence we can pull it out, and also remove the pointer in the WasmCodeAllocator. The argument passed from the single constructor call is now inlined in the constructor itself. Drive-by: Replace "GetPlatformPageAllocator()->CommitPageSize()" by just "CommitPageSize()". R=jkummerow@chromium.org Bug: v8:11879 Change-Id: I6c0e74cea308f5806d1aa479945d90b6ef8d1613 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972909 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75270}
-
Clemens Backes authored
There is exactly one WasmEngine per process, hence we do not need to store or pass a pointer to it. We just use {GetWasmEngine} (which just reads a global variable) whenever we need it. R=jkummerow@chromium.org Bug: v8:11879 Change-Id: I7e0e86e326f4cafe5a894af0ff6d35803c0340a9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972725 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Maya Lekova <mslekova@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75266}
-
- 18 Jun, 2021 1 commit
-
-
Dan Elphick authored
The adding of base:: was mostly prepared using git grep and sed: git grep -l <pattern> | grep -v base/vector.h | \ xargs sed -i 's/\b<pattern>\b/base::<pattern>/ with lots of manual clean-ups due to the resulting v8::internal::base::Vectors. #includes were fixed using: git grep -l "src/utils/vector.h" | \ axargs sed -i 's!src/utils/vector.h!src/base/vector.h!' Bug: v8:11879 Change-Id: I3e6d622987fee4478089c40539724c19735bd625 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968412Reviewed-by:
Clemens Backes <clemensb@chromium.org> Reviewed-by:
Hannes Payer <hpayer@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75243}
-
- 01 Jun, 2021 1 commit
-
-
Benedikt Meurer authored
In the Chrome DevTools Protocol, the step actions are named StepOut, StepOver, and StepInto, but internally we used StepOut, StepNext, and StepIn instead. This change adjusts the naming to be consistent. Bug: chromium:901814, chromium:1162229 Change-Id: Id3502a1b0a4aadd94734ec3d1fef73c1782fa220 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928510Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#74877}
-
- 15 Apr, 2021 1 commit
-
-
Thibaud Michaud authored
We currently allow OSR (On-Stack Replacement) of arbitrarily deep return addresses. This is in direct violation of Intel CET's shadow stack, which we plan to enable eventually. This change works around this by postponing OSR until after we return to the old code. The main changes are: - Reserve a slot in Liftoff frames to store the OSR target, - Skip the return address modification, and instead store the new code pointer in the dedicated slot, - Upon returning to the old code, check the slot and do an indirect jump to the new code if needed. CET also prevents indirect jumps to arbitrary locations, so the last point is also a CET violation. Valid indirect jump targets must be marked with the ENDBRANCH instruction, which I will do in a follow-up CL. Bug: v8:11654 Change-Id: I6925005211aa95d60803b9409e3c07c7c226b25c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2826127 Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#73977}
-
- 22 Mar, 2021 2 commits
-
-
Clemens Backes authored
Stepping code that is left on the stack will repeatedly call the WasmDebugBreak function. This has no observable effect, except for severe slowdown of execution. In the linked bug, we were executing at least another few million instructions in the same frame, so it appeared that it never finishes. This CL fixes that by replacing stepping code with non-stepping code if the WasmDebugBreak runtime function is called from stepping code but we are not stepping (any more). Adding a test for this is difficult, since this only has an effect on performance. R=thibaudm@chromium.org Bug: chromium:1153308 Change-Id: I02feb04a156dfe81ca76ce26f0af131c470ef7a3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775575 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#73567}
-
Manos Koukoutos authored
This is a more canonical type name, and is in line with {kVoidCode}. Change-Id: Iaae9524b6fb6ecaafd63ce81cf30e3d01ca3e525 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2775565 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#73557}
-
- 08 Mar, 2021 1 commit
-
-
Clemens Backes authored
Remove the include from js-array-buffer-inl.h, because the wasm engine is not used in that file. Add missing includes in other files that relied on the recursive include. R=jkummerow@chromium.org Bug: v8:11238 Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel Change-Id: I8b7f11ce92858cbc0ccf26925159486ed39573fa Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2739650Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#73254}
-
- 05 Mar, 2021 2 commits
-
-
Clemens Backes authored
If we use code from the cache, we have to re-install it in the NativeModule. Otherwise it won't be hit on calls. R=thibaudm@chromium.org Bug: v8:11516 Change-Id: Ie5f035e490d6525147a05b1fda1038b030e25d18 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2739644Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#73228}
-
Jakob Kummerow authored
This adds support for WasmGC objects (structs/arrays) to the inspector backend. For prettier printing, it also adds support for reading the "type" and "field" subsections of the "name" section in Wasm modules. This patch includes a revert of most of commit crrev.com/987a7f4a because types are more complicated now. Bug: v8:7748, chromium:1177784 Change-Id: Icec52cbbb32291b0e773b40be6771a678c6ec79b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715193 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by:
Manos Koukoutos <manoskouk@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#73212}
-
- 04 Mar, 2021 1 commit
-
-
Clemens Backes authored
This is a reland of fab754ff. The lock-order inversion is fixed by putting the old code into the surrounding WasmCodeRefScope such that it gets deleted only after releasing the mutex. Original change's description: > [wasm][debug] Cache debugging code > > This adds a little cache for debugging code, including stepping code. > Especially in stepping, we are currently repeatedly recompiling the same > function, because whenever we pause (after every step) we clear > stepping, only to reinstantiate it if the user continues stepping. > Especially in source-level stepping this is wasteful, because stepping > over a single line of C++ code can execute hundreds or thousands of > steps in wasm. > > R=thibaudm@chromium.org > > Bug: chromium:1172299 > Change-Id: Id59a26cc67a5bf4a2d3cf6b1e8f14a8b1c73712c > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732015 > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> > Commit-Queue: Clemens Backes <clemensb@chromium.org> > Cr-Commit-Position: refs/heads/master@{#73162} Bug: chromium:1172299 Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng Change-Id: Ic2f92e2758e78dc4912021cd17267a4da563c0a1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732675Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#73188}
-
- 03 Mar, 2021 2 commits
-
-
Clemens Backes authored
This reverts commit fab754ff. Reason for revert: TSan failures: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20isolates/13875/overview Original change's description: > [wasm][debug] Cache debugging code > > This adds a little cache for debugging code, including stepping code. > Especially in stepping, we are currently repeatedly recompiling the same > function, because whenever we pause (after every step) we clear > stepping, only to reinstantiate it if the user continues stepping. > Especially in source-level stepping this is wasteful, because stepping > over a single line of C++ code can execute hundreds or thousands of > steps in wasm. > > R=thibaudm@chromium.org > > Bug: chromium:1172299 > Change-Id: Id59a26cc67a5bf4a2d3cf6b1e8f14a8b1c73712c > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732015 > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> > Commit-Queue: Clemens Backes <clemensb@chromium.org> > Cr-Commit-Position: refs/heads/master@{#73162} Bug: chromium:1172299 Change-Id: I8fac7701e6f58012c8e17322c22f29692ee8932b No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732020 Auto-Submit: Clemens Backes <clemensb@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#73168}
-
Clemens Backes authored
This adds a little cache for debugging code, including stepping code. Especially in stepping, we are currently repeatedly recompiling the same function, because whenever we pause (after every step) we clear stepping, only to reinstantiate it if the user continues stepping. Especially in source-level stepping this is wasteful, because stepping over a single line of C++ code can execute hundreds or thousands of steps in wasm. R=thibaudm@chromium.org Bug: chromium:1172299 Change-Id: Id59a26cc67a5bf4a2d3cf6b1e8f14a8b1c73712c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732015Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#73162}
-
- 26 Feb, 2021 1 commit
-
-
Clemens Backes authored
In https://crrev.com/c/2707170, Liftoff was changed to only store the ValueKind instead of the ValueType, because we only need to know kind for code emission. For debugging though, the whole type is useful. This CL changes the debug sidetable back to store the full type, and retrieves this information from the decoder. R=jkummerow@chromium.org Bug: v8:11477 Change-Id: I08a512d24cdf0955c95f3b9261d68a02a39b9b4e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720302 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#73068}
-
- 24 Feb, 2021 1 commit
-
-
Clemens Backes authored
The precise type is only used for validation. For code generation, knowing the kind is more than enough. Hence, only store and pass the ValueKind in Liftoff, and not the full ValueType. R=manoskouk@chromium.org Bug: v8:11477 Change-Id: Ia42c0fa419f75b508bd2f210c767b631e93d3398 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2707170 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/master@{#72997}
-
- 22 Feb, 2021 1 commit
-
-
Clemens Backes authored
Backends do not care about the concrete type, they only need to know the "kind" (e.g. "ref" or "i32"). In order to prepare Liftoff to use the value kind instead of the value type for all stored data, this CL moves the kind out of the ValueType and makes it a top-level enum. R=manoskouk@chromium.org Bug: v8:11477 Change-Id: I489d6c5207e6ff1b66e2afbe78a156d66df27eb3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2707169 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Manos Koukoutos <manoskouk@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#72896}
-
- 12 Feb, 2021 1 commit
-
-
Clemens Backes authored
This CL adds support for instrumentation breakpoints in wasm. The request for "break on entry" is set on the script, and we need to keep it stored there because there might not be any instances of that wasm module yet. Once instances get created, the flag value is transferred to all instances. The flag stored there is then checked in the function prologue in Liftoff debugging code. This ensures that we will stop at the first valid break position in any function within that module. Hitting that instrumentation breakpoint will then clear the flag from the script and from all other live instances (in the same isolate). A first basic test is contained in this CL. More tests will be added later. R=thibaudm@chromium.org, bmeurer@chromium.org Bug: chromium:1151211 Change-Id: I5442d4044934988269becececc03699b850d51d7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690588Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#72701}
-
- 08 Feb, 2021 1 commit
-
-
Clemens Backes authored
For functions with a very large stack, the debug side table repeats a lot of information: Most values will be spilled to the stack, still every single entry in the debug side table repeats information about them (type, stack offset). This leads to the size of the debug side table to be quadratic in the size of the function. In the linked bug, the generation of the debug side table took ~400ms, whereas Liftoff compilation alone just took 16ms. This CL optimized the debug side table by delta-encoding the entries, i.e. only storing stack slots that changed. This reduces the size of the table significantly, at the cost of making lookup slower, since that now has to search the table backwards for the last entry that had information about a specific slot. For now, this seems like a good compromise. If it turns out to be a problem, we could speed up the lookup by either forcing a full dump of the stack state after N entries, or by dynamically inserting new entries during lookup, whenever we find that we had to search backwards more than N entries. That would speed up subsequent lookups then. On the reproducer in the linked bug, this change reduces the time to generate the debug side table from ~400ms to ~120ms. Before this CL, the debug side table has 13,314 entries with a total of 38,599,606 stack value entries. After this CL, it shrinks to 20,037 stack value entries in the 13,314 entries (average of ~1.5 instead of ~2,899). R=thibaudm@chromium.org Bug: chromium:1172299 Change-Id: Ie726bb82d4c6648cc9ebd130115ee7ab3d1d551b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2676636Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#72558}
-
- 04 Feb, 2021 1 commit
-
-
Clemens Backes authored
Instead of passing a bunch of objects and pointers to {GenerateLiftoffDebugSideTable}, just pass the WasmCode pointer for which the debug sidetable should be created. This requires changing the corresponding cctests to actually compile code, such that we can get a WasmCode pointer. R=thibaudm@chromium.org Bug: chromium:1172299 Change-Id: If42f06a545feb590f9c2377ce95e6214bbc6f566 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2674006Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#72526}
-
- 02 Feb, 2021 2 commits
-
-
Benedikt Meurer authored
Previously the WebAssembly debugger support completely ignored the condition on breakpoints. With this change, we check conditions (snippets of JavaScript) properly, which enables not only conditional breakpoints in the front-end, but also other features like 'Never pause here' (which simply sets `false` as condition) and log points. Fixed: chromium:1173007 Bug: chromium:1173006 Change-Id: I02c740d383378a1f4cc08134ad571bea08e9a905 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2666690Reviewed-by:
Clemens Backes <clemensb@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#72485}
-
Clemens Backes authored
We are often stepping multiple times without inspecting the state in-between. Hence, the generated debug side table is often not being used. Instead of always generating it, we can generate it lazily on demand, which can avoid the need to generate it at all. R=thibaudm@chromium.org TEST=inspector/debugger/wasm-stepping Bug: chromium:1172299 Change-Id: I9b9ff4485d65d720d23585856b3d672925460667 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2664446 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#72484}
-
- 13 Jan, 2021 1 commit
-
-
Benedikt Meurer authored
This moves the logic for the debug name heuristic, which derives names for imported and exported entities from the relevant tables, into wasm-debug.{cc,h} and stores these maps on the DebugInfoImpl rather than on the WasmModule. Drive-by-fix: Also use the import table based heuristic for function names, just like we use it for everything else. Bug: chromium:1164305 Change-Id: I8a21e0880c680079f63e6607b5b62c788049b9e1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625870 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#72061}
-
- 11 Jan, 2021 1 commit
-
-
Benedikt Meurer authored
Previously the implementation of the scope iterator objects and the debug proxy lived in src/wasm, and they are now being moved to src/debug, to better align with the JavaScript debugging interface, which also lives in src/debug. Bug: chromium:1162229, chromium:1071432 Change-Id: I7f89ced88a1231ad6a923be6e85a93f1876a2024 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2621084Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#72007}
-
- 08 Jan, 2021 2 commits
-
-
Benedikt Meurer authored
Previously the Debug Proxy API that's exposed on Wasm frames by Runtime.evaluateOnCallFrame() was implemented via actual JSProxy instances. That means that all entities such as "memories", "tables", "stack", "globals", etc. were JSProxy instances with "get" and "has" traps. But that has a couple of down-sides: 1. In DevTools front-end, the proxies are shown as JSProxy, which is not very useful to developers, since they cannot interact with them nor can they inspect their contents. And the object preview also only shows "Proxy {}" for them. 2. The performance doesn't scale well, which becomes a painful bottleneck with larger Wasm modules that contain hundreds of thousands of functions or globals. 3. We cannot use the JSProxy instances in the Scope view (for the reasons outlined in 1.) and hence we have different logic to provide Scope values than values in the rest of DevTools, which led to subtle but annoying bugs and inconsistencies. This also changes the "locals" implementation by querying the values ahead of time, similar to the object exposed to the Scope view, instead of on-demand, since the "locals" object might survive the current debugger pause and peeking into the stack afterwards would read invalid memory (and might even be a security issue). For being able to change locals we need to look into a similar solution as what we have for JavaScript locals already. The expression stack already works this way. For performance reasons (especially scaling to huge, realistic Wasm modules), we cache the per-instance proxies ("functions", "memories", "tables" and "globals") on the WasmInstanceObject and reuse them (which is safe since they have a `null` prototype and are non-extensible), and we also cache the proxy maps (with the interceptors) on the JSGlobalObject per native context. Doc: http://bit.ly/devtools-wasm-entities Bug: chromium:1127914, chromium:1159402, chromium:1071432, chromium:1164241 Change-Id: I6191035fdfd887835ae533fcdaabb5bbc8e661ae Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2606058 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#71981}
-
Benedikt Meurer authored
Previously we had introduced a special `v8::internal::WasmValue` type which we used to expose Wasm values to the Scope view in Chromium DevTools. The problem however is that these values cannot be exposed to JavaScript (and in particular not to Debug Evaluate), which means that particularly for v128 and i64 we have inconsistent representations across the various parts of DevTools. This change removes the `wasm` type from the RemoteObject and all the adjacent logic, and paves the way for a uniform representation of Wasm values throughout DevTools. For i64 we will simply use BigInt consistently everywhere, and for i32, f32 and f64 we'll just use Number. For externref we will represent the values as-is directly. For v128 values we currently use a Uint8Array, but will introduce a dedicated WasmSimd128 class in a follow-up CL. Bug: chromium:1071432 Fixed: chromium:1159402 Change-Id: I0671e5736c9c27d7ca376e23ed74f16d36e03c80 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2614428Reviewed-by:
Zhi An Ng <zhin@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#71962}
-
- 05 Jan, 2021 2 commits
-
-
Benedikt Meurer authored
Previously the proxies that make up the DebugEvaluate implementation for Wasm frames lived in wasm-js.cc, but that was quite confusing since (a) the rest of the debug support for Wasm lives in wasm-debug.cc (and we intend to eventually unify the DebugEvaluate and Scope objects), and (b) the wasm-js.cc file is explicitly about the WebAssembly JS API that's part of the WebAssembly specification, and the DebugEvaluate proxies aren't part of that. Bug: chromium:1162229, chromium:1071432, chromium:1127914 Change-Id: I63016dcace6d8e2af4a03c8eed4f02d464c1dee1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2609418 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#71911}
-
Benedikt Meurer authored
Drive-by-fix: Handle duplicate globals names correctly in the scope exposed module object. Bug: chromium:1127914, chromium:1071432 Change-Id: I697256642c5ddbc13f86ff25ab012c53537b9c88 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2609416 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#71910}
-
- 29 Dec, 2020 1 commit
-
-
Benedikt Meurer authored
The "imports" and "exports" that were exposed on WebAssembly frames via Debug-Evaluate aren't useful for the DWARF C/C++ extension (and likely not for any other language extension), since they only expose static information that's easily available (upfront) by reading the Wasm wire bytes. In fact, there are already standardized functions in the WebAssembly specification, namely `WebAssembly.Module.imports(module)` and `WebAssembly.Module.exports(module)`, which yield static information about the imports and exports of a Wasm module. So instead of exposing special, non-standard "imports" and "exports", we now instead expose both the "instance" and the "module" objects via both the Debug Proxy and the Scope view, and also add internal [[Exports]] and [[Imports]] properties to WasmModuleObject, which under the hood use the standard methods mentioned above. Fixed: chromium:1162069 Bug: chromium:1071432, chromium:1083146 Screenshot: https://imgur.com/lcaW2jL.png Doc: https://docs.google.com/document/d/1rqbu0jKTl3q_xCxLnKzkjGXWEsHnJ9aERVhKV9RNDgE#bookmark=id.925bb2qgou38 Change-Id: Ie27e55bb08ea5f90493c57375bf2b48dfb11a4d2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2606050 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#71893}
-
- 07 Dec, 2020 1 commit
-
-
Benedikt Meurer authored
Previously V8 would wrap the WebAssembly.Memory backing stores into Uint8Arrays and report that as memories, but that's confusing to the developer, since that's not what's really being used. The way that DevTools presents the backing stores of memories, it's still perfectly possible to get hold of an Uint8Array if that's what the developer is looking for. To make it possible to easily identify the WebAssembly.Memory objects in the DevTools front-end (in particular for the memory inspector) we add a 'webassemblymemory' subtype to the Chrome DevTools Protocol. We also improve the description for the memories to include the number of active pages. Fixed: chromium:1155566 Screenshot: https://imgur.com/8enx57u.png Change-Id: I63dbabe0e372e9ad6dcc8e6642cdb743147a620c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2574699Reviewed-by:
Clemens Backes <clemensb@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#71641}
-
- 26 Nov, 2020 1 commit
-
-
Clemens Backes authored
This specific case was not implemented or tested before. Implementing it actually simplifies some of the existing logic, since StepOut can now reuse the generic logic in debug.cc for all cases (Wasm->Wasm, Wasm->JS, JS->Wasm). Drive-by: 1) Fix typo ("skip" -> "step"). 2) Move the check for Liftoff code from debug.cc to wasm-debug.cc, where it fits better. 3) Remove a TODO which is done already. R=thibaudm@chromium.org, szuend@chromium.org Bug: chromium:1145176 Change-Id: I415ca1d8bacef5b21bf1dafd9e16417ec2d12c7c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2560719 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#71428}
-
- 25 Nov, 2020 1 commit
-
-
Clemens Backes authored
This is a minor refactoring before fixing actual issues. 1) The update of the {per_isolate_data_} is moved into {FloodWithBreakpoints}, which is already taking the mutex. 2) The {PrepareStep} method takes a {WasmFrame*} directly instead of its ID. In most cases, this prevents the creation of an additional stack frame iterator. R=thibaudm@chromium.org Bug: chromium:1145176 Change-Id: I1a6cd15550bbb4ef78ba522427bed1c23185569e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2558318Reviewed-by:
Simon Zünd <szuend@chromium.org> Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#71399}
-
- 20 Nov, 2020 1 commit
-
-
Leszek Swirski authored
Because of LocalHeap safepoints, our existing assert scopes don't necessarily maintain the same guarantees as desired. In particular, DisallowHeapAllocation no longer guarantees that objects don't move. This patch transitions DisallowHeapAllocation to DisallowGarbageCollection, to ensure that code using this scope is also protected against safepoints. Change-Id: I0411425884f6849982611205fb17bb072881c722 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2540547 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Peter Marshall <petermarshall@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#71319}
-
- 17 Nov, 2020 1 commit
-
-
John Xu authored
Bug: v8:10927 Change-Id: Icbdc0d7329ddd466e7d67a954246a35795b4dece Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2507310 Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Reviewed-by:
Peter Marshall <petermarshall@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#71220}
-
- 09 Nov, 2020 1 commit
-
-
Clemens Backes authored
Replace by explicitly deleting the copy constructor and copy assignment operator. R=zhin@chromium.org Bug: v8:11074 Change-Id: Ie36f75619243728e99dd6c7117a97f655d7c00f9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2523313Reviewed-by:
Zhi An Ng <zhin@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#71041}
-
- 30 Oct, 2020 1 commit
-
-
Benedikt Meurer authored
Building these objects takes a lot of time and memory for realistic applications and exposing them via the Scope view in DevTools isn't practical either. We have a replacement in the Console now, and if this needs more exposure we can think about other, more scalable ways with better UX. Fixed: v8:10986 Bug: chromium:1141781 Change-Id: I6177d63a987749889a9880cf0738031191eb5705 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2507696 Commit-Queue: Clemens Backes <clemensb@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#70894}
-