[webkit-changes] [WebKit/WebKit] e89ed5: [JSC] Kill Air's special condition for code size

Yusuke Suzuki noreply at github.com
Sat Mar 4 23:12:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e89ed51e07de76eb4c3488a4d9b80befc7c672b6
      https://github.com/WebKit/WebKit/commit/e89ed51e07de76eb4c3488a4d9b80befc7c672b6
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-03-04 (Sat, 04 Mar 2023)

  Changed paths:
    M Source/JavaScriptCore/runtime/Options.cpp
    M Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
    M Source/JavaScriptCore/wasm/WasmSlowPaths.cpp

  Log Message:
  -----------
  [JSC] Kill Air's special condition for code size
https://bugs.webkit.org/show_bug.cgi?id=253405
rdar://106244263

Reviewed by Mark Lam.

When we have only 128MB executable memory and we don't have interpreter for wasm,
some websites exhaust executable memory since all the code is compiled in Air apriori.
And at that time, we introduced a hack which switches to B3 compilation instead of Air
since B3 generates smaller code.

But now, we have 512MB executable memory, and we have interpreter. So even when executable
memory gets exhausted, we don't crash. Plus, Air BBQ gets replaced with new BBQ which generates
2x~ smaller code than Air BBQ. And because of interpreter, executable memory usage is significantly
lower than before anyway.

This patch removes the introduced hack at that time, when new BBQJIT is enabled. We ensured that
original websites requiring this hack works fine without this hack at this point. (rdar://54275409)

* Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::planGeneratesLoopOSREntrypoints):
(JSC::Wasm::BBQPlan::compileFunction):
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::WASM_SLOW_PATH_DECL):

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




More information about the webkit-changes mailing list