Commit 4c8c8cac authored by Jakob Linke's avatar Jakob Linke Committed by V8 LUCI CQ

[compiler] Add a use counter for Turbofan OSR compiles

.. to track how often OSR is used in the real world.

Chromium CL: crrev.com/c/3853648

Bug: v8:13228
Change-Id: I9aee2eefb8a7b479e6ade403f46bfd7eac9ac5cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3852388Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82685}
parent 32d23e7b
......@@ -540,6 +540,7 @@ class V8_EXPORT Isolate {
kInvalidatedMegaDOMProtector = 112,
kFunctionPrototypeArguments = 113,
kFunctionPrototypeCaller = 114,
kTurboFanOsrCompileStarted = 115,
// If you add new values here, you'll also need to update Chromium's:
// web_feature.mojom, use_counter_callback.cc, and enums.xml. V8 changes to
......
......@@ -1134,6 +1134,10 @@ MaybeHandle<CodeT> CompileTurbofan(Isolate* isolate,
job->compilation_info()->set_discard_result_for_testing();
}
if (IsOSR(osr_offset)) {
isolate->CountUsage(v8::Isolate::kTurboFanOsrCompileStarted);
}
// Prepare the job and launch concurrent compilation, or compile now.
if (IsConcurrent(mode)) {
if (CompileTurbofan_Concurrent(isolate, std::move(job))) return {};
......
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