Skip to content

Commit 00bbb5f

Browse files
alexmarkovcommit-bot@chromium.org
authored andcommitted
[vm/bytecode] Avoid eager foreground compilations from InlineCacheMissHandler
Previously, InlineCacheMissHandler forced foreground compilation of a target even if interpreter is enabled. This might cause excessive compilation of functions which are executed only a few times, as well as simultaneous compilation of a function in background and foreground. Change-Id: If716370d408cf9cff1b72123ab24d609246961a1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112200 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Alexander Markov <[email protected]>
1 parent 08205fd commit 00bbb5f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

runtime/vm/runtime_entry.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,12 @@ static void TrySwitchInstanceCall(const ICData& ic_data,
11391139
return;
11401140
}
11411141

1142+
// Avoid forcing foreground compilation if target function is still
1143+
// interpreted.
1144+
if (FLAG_enable_interpreter && !target_function.HasCode()) {
1145+
return;
1146+
}
1147+
11421148
const Array& data = Array::Handle(zone, ic_data.entries());
11431149
const Code& target = Code::Handle(zone, target_function.EnsureHasCode());
11441150
CodePatcher::PatchInstanceCallAt(caller_frame->pc(), caller_code, data,

0 commit comments

Comments
 (0)