Files
Leszek Swirski e96c377e5c [debug] Wait for optimization to finish before deopting
Currently, when we want to make sure that a function is not present in
any optimized code (whether as the top-level function or an inlined
function), we can deopt existing optimized code but have to abort all
ongoing compilation jobs since we don't have visibility into what they
have or will inline.

This has the problem that, if you are breakpointing or stepping a lot,
you can starve a function that is trying to optimize despite being
unrelated to the function you are trying to debug -- it will repeatedly
try to optimize and get aborted. This is unlikely to show up much in
real-world cases (though it could, particularly with automated
debugging), but it certainly shows up in debugget unit tests in
compilation stress variants.

Rather than aborting compilation jobs, we can let them finish, and then
potentially immediately deopt if we got unlucky. This means blocking the
main thread, but since this is the debugger, that's probably ok.

Change-Id: Ib195150df93b7feab758b4bd6fad0a6c6494c0d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7766696
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#106551}
2026-04-16 07:16:30 -07:00
..