[webkit-reviews] review granted: [Bug 208490] Implement 1GB of executable memory on arm64 : [Attachment 393449] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 13 11:31:51 PDT 2020
Keith Miller <keith_miller at apple.com> has granted Saam Barati
<sbarati at apple.com>'s request for review:
Bug 208490: Implement 1GB of executable memory on arm64
https://bugs.webkit.org/show_bug.cgi?id=208490
Attachment 393449: patch
https://bugs.webkit.org/attachment.cgi?id=393449&action=review
--- Comment #24 from Keith Miller <keith_miller at apple.com> ---
Comment on attachment 393449
--> https://bugs.webkit.org/attachment.cgi?id=393449
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=393449&action=review
r=me if you make the requested changes and fix Win build.
> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:113
> +#if USE(JUMP_ISLANDS)
> +static constexpr size_t fixedExecutableMemoryPoolSize = 1 * 1024 * 1024 *
1024;
> +// These sizes guarantee that any jump within an island can jump forwards or
backwards
> +// to the adjacent island in a single instruction.
> +static constexpr size_t regionSize = 112 * 1024 * 1024;
> +static constexpr size_t islandRegionSize = 16 * 1024 * 1024;
> +static constexpr size_t numberOfRegions = fixedExecutableMemoryPoolSize /
regionSize;
> +static constexpr size_t islandSizeInBytes = 4;
> +static constexpr size_t maxIslandsPerRegion = islandRegionSize /
islandSizeInBytes;
> +#else
> static constexpr size_t fixedExecutableMemoryPoolSize = 128 * 1024 * 1024;
> +#endif
> #elif CPU(X86_64)
> -static constexpr size_t fixedExecutableMemoryPoolSize = 1024 * 1024 * 1024;
> +static constexpr size_t fixedExecutableMemoryPoolSize = 1 * 1024 * 1024 *
1024;
Can we switch to using the MB/GB constants here?
> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:815
> + CodeLocationLabel<ExecutableMemoryPtrTag> rootJumpLocation;
Can we call this jumpSourceLocation? rootJumpLocation doesn't really make it
clear what this is to me. I thought it was the destination for a while, which
clearly would have been borked.
> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:824
> + RedBlackTree<Islands, void*> islandsForJumpLocation;
ditto on changing this to m_islandsForJumpSourceLocation. You also don't have
an m_ prefix which is weird.
> Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:173
> + for (unsigned i = 0; i < m_codeBlock->m_wasmToWasmCallsites.size();
++i) {
> + stageRepatch(m_codeBlock->m_wasmToWasmCallsites[i]);
> + if (m_codeBlock->m_llintCallees) {
> + LLIntCallee& llintCallee =
m_codeBlock->m_llintCallees->at(i).get();
> + if (JITCallee* replacementCallee =
llintCallee.replacement())
> + stageRepatch(replacementCallee->wasmToWasmCallsites());
> + if (OMGForOSREntryCallee* osrEntryCallee =
llintCallee.osrEntryCallee())
> + stageRepatch(osrEntryCallee->wasmToWasmCallsites());
> + }
> + if (BBQCallee* bbqCallee = m_codeBlock->m_bbqCallees[i].get()) {
> + if (OMGCallee* replacementCallee = bbqCallee->replacement())
> + stageRepatch(replacementCallee->wasmToWasmCallsites());
> + if (OMGForOSREntryCallee* osrEntryCallee =
bbqCallee->osrEntryCallee())
> + stageRepatch(osrEntryCallee->wasmToWasmCallsites());
> + }
> + }
Seems like we could have some code deduplication between the different plans...
Can you do that?
> Tools/ChangeLog:8
> + * Scripts/run-jsc-stress-tests:
I think you need to update this for the TestWTF changes? Can you also add a
TestWTF for RedBlackTree::iterate?
More information about the webkit-reviews
mailing list