v8/test/debugger/debug
Andreas Haas 37e5a28add Reland: "[wasm] Compile debug code lazily"
Three issues were fixed:
* In debug state, only publish debug code.
* When entering debugging in an isolate, only delete the code of
  those NativeModules that aren't in debug state already.
* When async compilation finishes, only throw away code if the debug
  state changed during compilation.

Original message:

Currently V8 recompiles all functions of a WebAssembly module when a
debugging session starts. This is outdated behavior and
causes OOMs for developers. With this CL all compiled code just gets
removed when a debugging session starts, and debugging code gets
compiled lazily.

This behavior may lead to small delays whenever a new function gets
entered by the debugger. However, developers are used to debugging code
being slightly slower, and the small delays should be in the order of
few milliseconds. On the other hand, debug modules can be big,
sometimes even more than 1'000'000 functions, and developers reported
OOMs when debugging.

R=clemensb@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel
Bug: v8:13541, chromium:1372621, v8:13224
Change-Id: Ie27388a287cd16a67a483e14fc22c2ab4180962e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079190
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84873}
2022-12-15 14:59:13 +00:00
..
compiler Revert "[turbofan] Making OSR concurrent" 2022-02-21 14:02:43 +00:00
es6 [debug] Remove statement position from spreads in array literals. 2022-09-28 10:51:34 +00:00
es8 [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
harmony
ignition [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
regress Reland "[debug] Immediately step-in for 'stack check triggered' debug breaks" 2022-09-01 10:33:03 +00:00
side-effect Ship Array grouping 2022-09-28 20:58:40 +00:00
wasm Reland: "[wasm] Compile debug code lazily" 2022-12-15 14:59:13 +00:00
debug-allscopes-on-debugger.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-backtrace.js
debug-bigint.js
debug-break-class-fields.js Reland "[class] implement reparsing of class instance member initializers" 2022-01-24 16:24:35 +00:00
debug-break-inline.js
debug-break-microtask.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-break-native.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-break-return.js
debug-breakpoints.js
debug-clearbreakpoint.js
debug-compile-event.js
debug-compile-optimized.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-conditional-breakpoints.js
debug-constructor.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-enable-disable-breakpoints.js
debug-eval-scope.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-evaluate-arguments.js
debug-evaluate-bool-constructor.js
debug-evaluate-closure.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-evaluate-dead-function-fails.js [cleanup] Remove --stress-opt remnants 2022-08-31 08:37:44 +00:00
debug-evaluate-declaration.js
debug-evaluate-function-var.js
debug-evaluate-local-repl-hole.js
debug-evaluate-locals-capturing.js [cleanup] Remove --stress-opt remnants 2022-08-31 08:37:44 +00:00
debug-evaluate-locals-optimized-double.js
debug-evaluate-locals-optimized.js
debug-evaluate-locals.js
debug-evaluate-modify-catch-block-scope.js [cleanup] Remove --stress-opt remnants 2022-08-31 08:37:44 +00:00
debug-evaluate-modify-this.js
debug-evaluate-nested-let.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-evaluate-repl-mode-await.js
debug-evaluate-repl-mode-optimized.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-evaluate-repl-mode.js Adding support for const redeclaration on REPL mode. 2021-05-11 16:47:04 +00:00
debug-evaluate-shadowed-context-reuse.js [debug] Re-use block lists across multiple local debug-evaluates 2022-10-13 07:44:59 +00:00
debug-evaluate-shadowed-context.js [debug] Re-use block lists across multiple local debug-evaluates 2022-10-13 07:44:59 +00:00
debug-evaluate-with.js
debug-evaluate.js
debug-event-listener.js
debug-exceptions.js
debug-function-scopes.js
debug-generator-break-on-stack.js
debug-generator-break.js
debug-liveedit-1.js
debug-liveedit-2.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-liveedit-3.js
debug-liveedit-4.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-liveedit-arrow-function-at-start.js
debug-liveedit-check-stack.js [debug] Disallow LiveEdit of active frames. 2021-04-28 13:00:19 +00:00
debug-liveedit-compile-error.js
debug-liveedit-inline.js
debug-liveedit-literals.js
debug-liveedit-newsource.js
debug-liveedit-patch-positions-replace.js
debug-liveedit-recursion.js [debug] Disallow LiveEdit of active frames. 2021-04-28 13:00:19 +00:00
debug-materialized.js
debug-modules-set-variable-value.mjs [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-multiple-breakpoints.js
debug-multiple-var-decl.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-negative-break-points.js
debug-optimize.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-print.js
debug-receiver.js
debug-return-value.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-scopes-suspended-generators.js
debug-scopes.js
debug-set-variable-value.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-stack-check-position.js Reland "[debug] Immediately step-in for 'stack check triggered' debug breaks" 2022-09-01 10:33:03 +00:00
debug-step-2.js
debug-step-3.js
debug-step-4.js
debug-step-end-of-script.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-step-into-json.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-step-into-valueof.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-step-microtask.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-step-stub-callfunction.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-step-turbofan.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-step.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-accessor-ic.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-accessor.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-builtin-callback-opt.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-builtin-callback.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-builtin.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-call-function-stub.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-construct-call.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-constructor.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-foreach.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-function-call.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepin-property-function-call.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-stepnext-do-while.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepout-recursive-function.js
debug-stepout-scope-part1.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepout-scope-part2.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepout-scope-part3.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepout-scope-part4.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepout-scope-part5.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepout-scope-part6.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepout-scope-part7.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepout-scope-part8.js [debug][cleanup] Use consistent StepInto and StepOver naming. 2021-06-01 11:26:57 +00:00
debug-stepout-to-builtin.js
deserialize-script-id.js
for-in-opt.js
function-source.js
lazy-deopt-then-flush-bytecode.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
regress-3225.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
regress-5207.js