v8/test/debugger/debug
Simon Zünd 07cc86889c [debug] Re-use block lists across multiple local debug-evaluates
This CL implements the heavy lifting for re-using block lists:

  - On local debug-evaluate, we check if the paused function already
    has a block list. If not, we do a full re-parse, calculate the
    block lists and stash them in the global map.

  - On a context lookup, we do the lookup slightly differently. The
    block lists now store "outer" locals, so we need to check the
    block list before we advance to the next context, not before we
    do the lookup in the current context.

The CL also duplicates the debugger test that checks most of these
shadowing edge cases. While we keep working on the new feature
we still want to check both configurations, but the feature is too
small to warrant a separate bot. Note that the file with the flag
enabled has one additional test case that fails with the old
implementation. Unfortunately it's non-trivial to fix in the old
implementation.

This CL drastically improves performance for conditional breakpoints
as they use local debug-evaluate under the hood. The worst case
example (https://crbug.com/1072939#c15) improves from 6.5 seconds
to 100ms.

R=jarin@chromium.org

Bug: chromium:1363561
Change-Id: I85f3d908d246f0d2e31ed272f4db6a852b9dbc39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3941584
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83665}
2022-10-13 07:44:59 +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 [debugger] materialize scope values in TDZ as undefined. 2020-06-15 10:09:58 +00:00
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 [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +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 [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
debug-bigint.js Remove always-true --harmony-bigint runtime flag 2018-10-01 11:31:13 +00:00
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 [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
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] removed most debugger js 2018-06-03 06:02:59 +00:00
debug-breakpoints.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-clearbreakpoint.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
debug-compile-event.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
debug-compile-optimized.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-conditional-breakpoints.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
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-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-eval-scope.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-evaluate-arguments.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
debug-evaluate-bool-constructor.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
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-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
debug-evaluate-function-var.js Reland "[debugger] Expose reference to the function in debug-evaluate" 2019-06-27 06:09:22 +00:00
debug-evaluate-local-repl-hole.js Introduce REPL mode 2019-11-06 09:17:04 +00:00
debug-evaluate-locals-capturing.js [cleanup] Remove --stress-opt remnants 2022-08-31 08:37:44 +00:00
debug-evaluate-locals-optimized-double.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
debug-evaluate-locals-optimized.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
debug-evaluate-locals.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
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 Reland "Implement top-level await for REPL mode" 2019-12-06 10:13:00 +00:00
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 [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
debug-evaluate.js [tests] Fix assertFalse(exception) anti-pattern 2018-03-21 10:59:46 +00:00
debug-event-listener.js [debug-wrapper] Add caught/uncaught to exception pauses 2016-11-10 09:05:29 +00:00
debug-exceptions.js [debug-wrapper] Add caught/uncaught to exception pauses 2016-11-10 09:05:29 +00:00
debug-function-scopes.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
debug-generator-break-on-stack.js
debug-generator-break.js
debug-liveedit-1.js [debug] migrate all liveedit tests to use LiveEdit::PatchScript 2018-06-21 15:34:16 +00:00
debug-liveedit-2.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-liveedit-3.js [debug] migrate all liveedit tests to use LiveEdit::PatchScript 2018-06-21 15:34:16 +00:00
debug-liveedit-4.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-liveedit-arrow-function-at-start.js [liveedit] Fix patching functions with start position zero 2018-07-18 16:20:22 +00:00
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] migrate all liveedit tests to use LiveEdit::PatchScript 2018-06-21 15:34:16 +00:00
debug-liveedit-inline.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
debug-liveedit-literals.js [debug] migrate all liveedit tests to use LiveEdit::PatchScript 2018-06-21 15:34:16 +00:00
debug-liveedit-newsource.js [debug] migrate all liveedit tests to use LiveEdit::PatchScript 2018-06-21 15:34:16 +00:00
debug-liveedit-patch-positions-replace.js [test] Fixes a spelling typo 2020-04-06 18:16:55 +00:00
debug-liveedit-recursion.js [debug] Disallow LiveEdit of active frames. 2021-04-28 13:00:19 +00:00
debug-materialized.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
debug-modules-set-variable-value.mjs [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-multiple-breakpoints.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
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-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
debug-optimize.js [flags] Rename --opt to --turbofan 2022-05-03 12:10:30 +00:00
debug-print.js [elements] Rename FAST elements kinds 2017-06-30 13:31:44 +00:00
debug-receiver.js Fix common misspellings 2017-08-02 09:35:28 +00:00
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 [turbofan] Only save live registers on suspend 2018-02-07 18:07:30 +00:00
debug-scopes.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
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 [debug] retire ScriptWrapper 2018-07-05 21:33:03 +00:00
for-in-opt.js [Test] Add PrepareForOptimization to debugger/ tests. 2019-04-29 13:47:16 +00:00
function-source.js [debug-wrapper] clearAllBreakPoints and several scripts functions 2016-11-17 09:34:18 +00:00
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 [ignition/turbo] Perform liveness analysis on the bytecodes 2016-11-29 12:27:15 +00:00