Commit 92d617a3 authored by Mike Stanton's avatar Mike Stanton Committed by Commit Bot

[compiler] Concurrency note for functions scheduled for debug

During background compilation, we check
SharedFunctionInfo::HasBreakInfo() to see if the function has
breakpoints for debugging, generally deciding not to inline the
function if so. We were concerned about the status of this bit
changing on the main thread. Happily, the main thread deoptimizes
all functions that inline the given function, and shuts down all
background compilation jobs as well. So it is not a meaningful
concern (that of say, ignored breakpoints). Updated a comment to
record this finding.

Bug: v8:7790
Change-Id: I7adbc5d19fc45eb7f4df1400c33f5988d9dac58d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848409
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74183}
parent 6dfbb095
......@@ -4291,6 +4291,9 @@ Reduction JSCallReducer::ReduceJSCall(Node* node,
Node* target = n.target();
// Do not reduce calls to functions with break points.
// If this state changes during background compilation, the compilation
// job will be aborted from the main thread (see
// Debug::PrepareFunctionForDebugExecution()).
if (shared.HasBreakInfo()) return NoChange();
// Raise a TypeError if the {target} is a "classConstructor".
......@@ -4758,6 +4761,9 @@ Reduction JSCallReducer::ReduceJSConstruct(Node* node) {
}
// Do not reduce constructors with break points.
// If this state changes during background compilation, the compilation
// job will be aborted from the main thread (see
// Debug::PrepareFunctionForDebugExecution()).
if (function.shared().HasBreakInfo()) return NoChange();
// Don't inline cross native context.
......
......@@ -1724,6 +1724,9 @@ Reduction JSTypedLowering::ReduceJSCall(Node* node) {
if (shared.has_value()) {
// Do not inline the call if we need to check whether to break at entry.
// If this state changes during background compilation, the compilation
// job will be aborted from the main thread (see
// Debug::PrepareFunctionForDebugExecution()).
if (shared->HasBreakInfo()) return NoChange();
// Class constructors are callable, but [[Call]] will raise an exception.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment