[baseline] Don't install if debugger has call hooks
We check if debugger needs to hook into every call when we enqueue the function to batch and when we compile, but we do not check it when we install it (that is, set_baseline_code), which is done in the main thread. Bug: v8:12713 Change-Id: I81ba221caed1060976e8865174d392a861f2ab24 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528988 Commit-Queue: Victor Gomes <victorgomes@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79500}
This commit is contained in:
parent
f198f35d5e
commit
03fd15956f
@ -27,6 +27,12 @@ namespace v8 {
|
||||
namespace internal {
|
||||
namespace baseline {
|
||||
|
||||
static bool CanCompileWithConcurrentBaseline(SharedFunctionInfo shared,
|
||||
Isolate* isolate) {
|
||||
return !shared.is_compiled() || shared.HasBaselineCode() ||
|
||||
!CanCompileWithBaseline(isolate, shared);
|
||||
}
|
||||
|
||||
class BaselineCompilerTask {
|
||||
public:
|
||||
BaselineCompilerTask(Isolate* isolate, PersistentHandles* handles,
|
||||
@ -60,8 +66,7 @@ class BaselineCompilerTask {
|
||||
}
|
||||
// Don't install the code if the bytecode has been flushed or has
|
||||
// already some baseline code installed.
|
||||
if (!shared_function_info_->is_compiled() ||
|
||||
shared_function_info_->HasBaselineCode()) {
|
||||
if (!CanCompileWithConcurrentBaseline(*shared_function_info_, isolate)) {
|
||||
return;
|
||||
}
|
||||
shared_function_info_->set_baseline_code(ToCodeT(*code), kReleaseStore);
|
||||
@ -102,7 +107,7 @@ class BaselineBatchCompilerJob {
|
||||
if (!maybe_sfi.GetHeapObjectIfWeak(&obj)) continue;
|
||||
// Skip functions where the bytecode has been flushed.
|
||||
SharedFunctionInfo shared = SharedFunctionInfo::cast(obj);
|
||||
if (ShouldSkipFunction(shared, isolate)) continue;
|
||||
if (CanCompileWithConcurrentBaseline(shared, isolate)) continue;
|
||||
tasks_.emplace_back(isolate, handles_.get(), shared);
|
||||
}
|
||||
if (FLAG_trace_baseline_concurrent_compilation) {
|
||||
@ -112,11 +117,6 @@ class BaselineBatchCompilerJob {
|
||||
}
|
||||
}
|
||||
|
||||
static bool ShouldSkipFunction(SharedFunctionInfo shared, Isolate* isolate) {
|
||||
return !shared.is_compiled() || shared.HasBaselineCode() ||
|
||||
!CanCompileWithBaseline(isolate, shared);
|
||||
}
|
||||
|
||||
// Executed in the background thread.
|
||||
void Compile(LocalIsolate* local_isolate) {
|
||||
local_isolate->heap()->AttachPersistentHandles(std::move(handles_));
|
||||
|
Loading…
Reference in New Issue
Block a user