Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 81f52509684ddc620c4c121aa8a3d226953687f6
      
https://github.com/WebKit/WebKit/commit/81f52509684ddc620c4c121aa8a3d226953687f6
  Author: Yusuke Suzuki <[email protected]>
  Date:   2023-05-09 (Tue, 09 May 2023)

  Changed paths:
    M Source/JavaScriptCore/jit/BaselineJITPlan.cpp
    M Source/JavaScriptCore/jit/BaselineJITPlan.h
    M Source/JavaScriptCore/jit/JIT.cpp
    M Source/JavaScriptCore/jit/JIT.h

  Log Message:
  -----------
  [JSC] JSC::JIT should be fully created and destroyed in the compiler thread
https://bugs.webkit.org/show_bug.cgi?id=256394
rdar://108965411

Reviewed by Justin Michaud.

This patch avoids creating and destroying JSC::JIT in the main thread. This is 
involving a lot of costly things,
like AssemblerBuffer instantiation, destruction of many data structures related 
to JIT etc.
This is the same to DFG / FTL: compiler should be instantiated in the compiler 
thread. From the compiler thread,
we get BaselineJITCode and LinkBuffer, and run the remaining main-thread task 
in BaselineJITPlan::finalize.

* Source/JavaScriptCore/jit/BaselineJITPlan.cpp:
(JSC::BaselineJITPlan::BaselineJITPlan):
(JSC::BaselineJITPlan::compileInThreadImpl):
(JSC::BaselineJITPlan::codeSize const):
(JSC::BaselineJITPlan::finalize):
* Source/JavaScriptCore/jit/BaselineJITPlan.h:
* Source/JavaScriptCore/jit/JIT.cpp:
(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::link):
(JSC::JIT::finalizeOnMainThread):
(JSC::JIT::privateCompile):
(JSC::JIT::doMainThreadPreparationBeforeCompile):
(JSC::JIT::codeSize const): Deleted.
* Source/JavaScriptCore/jit/JIT.h:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to