[TurboFan] Don't run child serializer if inlining is turned off

TurboFan serializes the callee functions when concurrent inlining is
turned on. However, if inlining itself is turned off (for ex: TurboProp)
we don't need to serialize these functions reducing time spent on
main thread.

Bug: v8:9684
Change-Id: If4aba1deb64188e411d4f82b27c475ea93a15344
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1932375
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65157}
This commit is contained in:
Mythri A 2019-11-25 15:43:37 +00:00 committed by Commit Bot
parent 94e21dea52
commit 03aaa4b3bf
3 changed files with 7 additions and 1 deletions

View File

@ -1431,6 +1431,9 @@ struct SerializationPhase {
flags |=
SerializerForBackgroundCompilationFlag::kAnalyzeEnvironmentLiveness;
}
if (data->info()->is_inlining_enabled()) {
flags |= SerializerForBackgroundCompilationFlag::kEnableTurboInlining;
}
RunSerializerForBackgroundCompilation(
data->zone_stats(), data->broker(), data->dependencies(),
data->info()->closure(), flags, data->info()->osr_offset());

View File

@ -1969,7 +1969,9 @@ void SerializerForBackgroundCompilation::ProcessCalleeForCallOrConstruct(
ProcessBuiltinCall(shared, new_target, arguments, speculation_mode, padding,
result_hints);
DCHECK_NE(shared->GetInlineability(), SharedFunctionInfo::kIsInlineable);
} else if (shared->GetInlineability() == SharedFunctionInfo::kIsInlineable &&
} else if ((flags() &
SerializerForBackgroundCompilationFlag::kEnableTurboInlining) &&
shared->GetInlineability() == SharedFunctionInfo::kIsInlineable &&
callee.HasFeedbackVector()) {
CompilationSubject subject =
callee.ToCompilationSubject(broker()->isolate(), zone());

View File

@ -23,6 +23,7 @@ enum class SerializerForBackgroundCompilationFlag : uint8_t {
kBailoutOnUninitialized = 1 << 0,
kCollectSourcePositions = 1 << 1,
kAnalyzeEnvironmentLiveness = 1 << 2,
kEnableTurboInlining = 1 << 3,
};
using SerializerForBackgroundCompilationFlags =
base::Flags<SerializerForBackgroundCompilationFlag>;