Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 52a97217691976f5ac23bdb1236caf0878bc6f3d
      
https://github.com/WebKit/WebKit/commit/52a97217691976f5ac23bdb1236caf0878bc6f3d
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-04-12 (Sun, 12 Apr 2026)

  Changed paths:
    M Source/JavaScriptCore/runtime/NativeCalleeRegistry.h
    M Source/JavaScriptCore/runtime/SamplingProfiler.cpp
    M Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
    M Source/JavaScriptCore/wasm/WasmCallee.cpp
    M Source/JavaScriptCore/wasm/WasmCallee.h
    M Source/JavaScriptCore/wasm/WasmIPIntPlan.cpp
    M Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
    M Source/JavaScriptCore/wasm/WasmOSREntryPlan.cpp

  Log Message:
  -----------
  [JSC] Avoid repeated lock contension due to NativeCalleeRegistry registration
https://bugs.webkit.org/show_bug.cgi?id=312082
rdar://174588184

Reviewed by Keith Miller.

We found that IPIntCallee's registration is taking huge lock contension.
But its entrypoint generation is no longer costly as we use the shared
thunk. We should avoid doing these registration from the multiple thread
concurrently, and do them in a batched style when finalizing all callees
at the end. Also we should have Box<PCToCodeOriginMap> in
OptimizingJITCallee instead of having it in NativeCalleeRegistry.

* Source/JavaScriptCore/runtime/NativeCalleeRegistry.h:
(JSC::NativeCalleeRegistry::registerCallees):
(JSC::NativeCalleeRegistry::unregisterCallee):
(JSC::NativeCalleeRegistry::addPCToCodeOriginMap): Deleted.
* Source/JavaScriptCore/runtime/SamplingProfiler.cpp:
(JSC::FrameWalker::recordJITFrame):
* Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::work):
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::Callee::pcToCodeOriginMap const):
(JSC::Wasm::IPIntCallee::setEntrypointWithoutRegistration):
* Source/JavaScriptCore/wasm/WasmCallee.h:
(JSC::Wasm::Callee::pcToCodeOriginMapImpl const):
(JSC::Wasm::OptimizingJITCallee::pcToCodeOriginMapImpl const):
(JSC::Wasm::OptimizingJITCallee::setPCToCodeOriginMap):
* Source/JavaScriptCore/wasm/WasmIPIntPlan.cpp:
(JSC::Wasm::IPIntPlan::compileFunction):
(JSC::Wasm::IPIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):
* Source/JavaScriptCore/wasm/WasmOSREntryPlan.cpp:
(JSC::Wasm::OSREntryPlan::work):

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



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

Reply via email to