Reduce Gigacage sizes
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2017 18:00:09 +0000 (18:00 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2017 18:00:09 +0000 (18:00 +0000)
commit470c67e656e79dff15c120fafdb85f41fd4016c0
tree0a4e1b97252b11046bf1d55bda377dafda0f5b08
parent43b68e350884cedf78ac9b4b13413aaa6ec65541
Reduce Gigacage sizes
https://bugs.webkit.org/show_bug.cgi?id=175920

Reviewed by Mark Lam.

Source/bmalloc:

This introduces the ability to have different gigacage sizes for different gigacages, and uses it to reduce the size of both
gigacages, but to different extents: Primitive gets 32GB with a 16GB runway and JSValue gets 16GB.

This is a ~10% membuster progression on my Mac Pro.

* bmalloc/Gigacage.cpp:
(Gigacage::ensureGigacage):
* bmalloc/Gigacage.h:
(Gigacage::size):
(Gigacage::alignment):
(Gigacage::mask):
(Gigacage::runway):
(Gigacage::totalSize):
(Gigacage::caged):
* bmalloc/Heap.cpp:
(bmalloc::Heap::Heap):
(bmalloc::Heap::gigacageSize):
* bmalloc/Heap.h:

Source/JavaScriptCore:

Teach all of the code generators to use the right gigacage masks.

Also teach Wasm that it has much less memory for signaling memories. With 32GB, we have room for 7 signaling memories. But if
we actually did that, then we'd have no memory left for anything else. So, this caps us at 4 signaling memories.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::caged):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::cage):
(JSC::AssemblyHelpers::cageConditionally):
* llint/LowLevelInterpreter64.asm:
* runtime/Options.h:

Source/WTF:

Provide filler API for the no-bmalloc/no-Gigacage case.

* wtf/Gigacage.h:
(Gigacage::mask):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@221148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Source/JavaScriptCore/jit/AssemblyHelpers.h
Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
Source/JavaScriptCore/runtime/Options.h
Source/WTF/ChangeLog
Source/WTF/wtf/Gigacage.h
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/Gigacage.cpp
Source/bmalloc/bmalloc/Gigacage.h
Source/bmalloc/bmalloc/Heap.cpp
Source/bmalloc/bmalloc/Heap.h