Skip to content

Commit f915fa4

Browse files
o-V8 LUCI CQ
authored andcommitted
[osr] Ensure trying to osr does not skip loop interrupts
Fixed: 374013413 Change-Id: I52d7b4e165e0abd0bd517a81d2e8ef3f1f802bfb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5946288 Commit-Queue: Darius Mercadier <[email protected]> Auto-Submit: Olivier Flückiger <[email protected]> Reviewed-by: Darius Mercadier <[email protected]> Cr-Commit-Position: refs/heads/main@{#96708}
1 parent 96b4b9d commit f915fa4

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

src/codegen/compiler.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,14 @@ MaybeHandle<Code> GetOrCompileOptimized(
13501350
}
13511351

13521352
// Do not optimize when debugger needs to hook into every call.
1353-
if (isolate->debug()->needs_check_on_function_call()) return {};
1353+
if (isolate->debug()->needs_check_on_function_call()) {
1354+
// Reset the OSR urgency to avoid triggering this compilation request on
1355+
// every iteration and thereby skipping other interrupts.
1356+
if (IsOSR(osr_offset)) {
1357+
function->feedback_vector()->reset_osr_urgency();
1358+
}
1359+
return {};
1360+
}
13541361

13551362
// Do not optimize if we need to be able to set break points.
13561363
if (shared->HasBreakInfo(isolate)) return {};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2024 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Flags: --enable-inspector
6+
7+
var Debug = debug.Debug;
8+
Debug.sendMessageForMethodChecked('Runtime.enable', {});
9+
const {msgid, msg} = Debug.createMessage('Runtime.evaluate', {
10+
expression: 'while(true) {}',
11+
throwOnSideEffect: true,
12+
timeout: 1000,
13+
})
14+
Debug.sendMessage(msg);
15+
Debug.takeReplyChecked(msgid).toString();

0 commit comments

Comments
 (0)