Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 227528432e5f6d0500a8fc5e68e4be7943ea9167
      
https://github.com/WebKit/WebKit/commit/227528432e5f6d0500a8fc5e68e4be7943ea9167
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-05-20 (Wed, 20 May 2026)

  Changed paths:
    M Source/JavaScriptCore/jit/BaselineJITPlan.cpp
    M Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

  Log Message:
  -----------
  [JSC] Collect profile from Baseline JIT compiler when LLInt -> Baseline
https://bugs.webkit.org/show_bug.cgi?id=315183
rdar://problem/177517089

Reviewed by Marcus Plutowski.

How long time compiler takes is depending on tiers. And our Baseline ->
DFG tierup is collecting profile based on the fact that we will see
several times of querying before going to DFG, and we have good chance
of collecting profiles without hurting performance. However while the
same policy is applied to LLInt -> Baseline tierup, the characteristics
is largely different. Some Baseline JIT code generation takes very long
time due to its CodeBlock size but our query frequency is high because
in general Baseline compilation finishes quickly so we would like to
tier up quicly. As a result, when Baseline code is very large, we end up
scanning value profile very frequently and collecting meaningless
information with high performance penalty.

We anyway collect profile when tiering up from Baseline to DFG. So LLInt
one is very supplemental and not so critical to DFG compilation. Let's
just offload it to Baseline JIT compiler thread itself and do it once
only when building Baseline JIT code. Still Baseline code will collect
more profiles so it is fine to DFG. And we can avoid paying huge cost of
profiling when tiering up from LLInt to Baseline, in particular when
Baseline code is huge.

* Source/JavaScriptCore/jit/BaselineJITPlan.cpp:
(JSC::BaselineJITPlan::compileInThreadImpl):
* Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):

Canonical link: https://commits.webkit.org/313583@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to