Commit 0b4573a5 authored by Maya Lekova's avatar Maya Lekova Committed by Commit Bot

[turbofan] Move one-shot-bytecode counter increment to serializer

Bug: v8:7790
Change-Id: I79b81d66751707756139db50720080a144bdcd38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1781045
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63506}
parent 0b403dcb
......@@ -1322,7 +1322,7 @@ void BytecodeGraphBuilder::VisitBytecodes() {
VisitSingleBytecode();
}
if (has_one_shot_bytecode) {
if (!FLAG_concurrent_inlining && has_one_shot_bytecode) {
isolate()->CountUsage(
v8::Isolate::UseCounterFeature::kOptimizedFunctionWithOneShotBytecode);
}
......
......@@ -983,7 +983,12 @@ void SerializerForBackgroundCompilation::TraverseBytecode() {
BytecodeArrayIterator iterator(bytecode_array());
ExceptionHandlerMatcher handler_matcher(iterator, bytecode_array());
bool has_one_shot_bytecode = false;
for (; !iterator.done(); iterator.Advance()) {
has_one_shot_bytecode =
has_one_shot_bytecode ||
interpreter::Bytecodes::IsOneShotBytecode(iterator.current_bytecode());
int const current_offset = iterator.current_offset();
IncorporateJumpTargetEnvironment(current_offset);
......@@ -1022,6 +1027,11 @@ void SerializerForBackgroundCompilation::TraverseBytecode() {
}
}
}
if (has_one_shot_bytecode) {
broker()->isolate()->CountUsage(
v8::Isolate::UseCounterFeature::kOptimizedFunctionWithOneShotBytecode);
}
}
void SerializerForBackgroundCompilation::VisitGetIterator(
......
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