Skip to content

Commit

Permalink
[JSC] Should fix the spin lock in jitCompileSIMDFunction from WasmSlo…
Browse files Browse the repository at this point in the history
…wPaths.cpp

https://bugs.webkit.org/show_bug.cgi?id=274326
rdar://128291244

Reviewed by Mark Lam.

Use thread yield to improve performance by reducing CPU waste in a spin lock.

* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::jitCompileSIMDFunction):

Canonical link: https://commits.webkit.org/279004@main
  • Loading branch information
hyjorc1 committed May 20, 2024
1 parent bf1f3dd commit 8718132
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/wasm/WasmSlowPaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static inline bool jitCompileSIMDFunction(Wasm::LLIntCallee* callee, Wasm::Insta
tierUpCounter.setCompilationStatus(memoryMode, Wasm::LLIntTierUpCounter::CompilationStatus::Compiling);
break;
case Wasm::LLIntTierUpCounter::CompilationStatus::Compiling:
// FIXME: This spinlock is bad, but this is only temporary. https://bugs.webkit.org/show_bug.cgi?id=274326
Thread::yield();
continue;
case Wasm::LLIntTierUpCounter::CompilationStatus::Compiled:
RELEASE_ASSERT(!!callee->replacement(memoryMode));
Expand Down

0 comments on commit 8718132

Please sign in to comment.