Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 02d16b1d8e1a8fe076e354412936c1af5a07f675
      
https://github.com/WebKit/WebKit/commit/02d16b1d8e1a8fe076e354412936c1af5a07f675
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-07-22 (Wed, 22 Jul 2026)

  Changed paths:
    M Source/JavaScriptCore/runtime/OptionsList.h
    M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp

  Log Message:
  -----------
  [JSC] Skew small function's OMG tierup call counts
https://bugs.webkit.org/show_bug.cgi?id=320046
rdar://182981673

Reviewed by Mark Lam.

When tiering up from BBQ to OMG, we would like to deprioritize very small
functions.

1. Very small functions are not having meaningful improvements from the
   tiering up. BBQ is fast enough and BBQ & OMG both has prologue and
   epilogue as they are the functions. If body size is small, then
   improvement effect is small.
2. OMG compilation has fix-sized cost offset, so regardless of the size
   of the function, compile requires some time. For very small functions,
   compile time is too long compared to the benefit we can get.
3. Very small functions will be inlined from the callers eventually. And
   in that case, callers will fully inline it, and remove the use of
   this very small functions completely. Then the compiled code becomes
   useless since the caller is covering it via inlining.

This patch adds a threshold and step function which reduces function
entry tier up count increment. Right now, focusing on entry increment
since we are focusing function invocation count, and loop would have
different stories. This patch sets 128 as a threshold, which is
empirically obtained from the measurement.

* Source/JavaScriptCore/runtime/OptionsList.h:
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::emitEntryTierUpCheck):

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



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

Reply via email to