[JSC] Do not create JIT related data under non-JIT mode
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 19:14:12 +0000 (19:14 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 19:14:12 +0000 (19:14 +0000)
commitfe6192546b20e6d0994929d402304ec75b5491c0
treef3d5b5886110b1e7d04affcbb3fa6ae86690a021
parentddb8134a3ffa17c32c3c31aa5e3a6fa2c8603d24
[JSC] Do not create JIT related data under non-JIT mode
https://bugs.webkit.org/show_bug.cgi?id=195982

Reviewed by Mark Lam.

We avoid creations of JIT related data structures under non-JIT mode.
This patch removes the following allocations.

1. JITThunks
2. FTLThunks
3. FixedVMPoolExecutableAllocator
4. noJITValueProfileSingleton since it is no longer used
5. ARM disassembler should be initialized when it is used
6. Wasm related data structures are accidentally allocated if VM::canUseJIT() == false &&
   Options::useWebAssembly() == true. Add Wasm::isSupported() function to check the both conditions.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.cpp:
(JSC::Heap::runEndPhase):
* jit/ExecutableAllocator.cpp:
(JSC::FixedVMPoolExecutableAllocator::~FixedVMPoolExecutableAllocator):
(JSC::ExecutableAllocator::initializeUnderlyingAllocator):
(JSC::ExecutableAllocator::isValid const):
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutableAllocator::memoryPressureMultiplier):
(JSC::ExecutableAllocator::allocate):
(JSC::ExecutableAllocator::isValidExecutableMemory):
(JSC::ExecutableAllocator::getLock const):
(JSC::ExecutableAllocator::committedByteCount):
(JSC::ExecutableAllocator::dumpProfile):
(JSC::startOfFixedExecutableMemoryPoolImpl):
(JSC::endOfFixedExecutableMemoryPoolImpl):
(JSC::ExecutableAllocator::initialize):
(JSC::ExecutableAllocator::initializeAllocator): Deleted.
(JSC::ExecutableAllocator::ExecutableAllocator): Deleted.
(JSC::ExecutableAllocator::~ExecutableAllocator): Deleted.
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocatorBase::isValid const):
(JSC::ExecutableAllocatorBase::underMemoryPressure):
(JSC::ExecutableAllocatorBase::memoryPressureMultiplier):
(JSC::ExecutableAllocatorBase::dumpProfile):
(JSC::ExecutableAllocatorBase::allocate):
(JSC::ExecutableAllocatorBase::setJITEnabled):
(JSC::ExecutableAllocatorBase::isValidExecutableMemory):
(JSC::ExecutableAllocatorBase::committedByteCount):
(JSC::ExecutableAllocatorBase::getLock const):
(JSC::ExecutableAllocator::isValid const): Deleted.
(JSC::ExecutableAllocator::underMemoryPressure): Deleted.
(JSC::ExecutableAllocator::memoryPressureMultiplier): Deleted.
(JSC::ExecutableAllocator::allocate): Deleted.
(JSC::ExecutableAllocator::setJITEnabled): Deleted.
(JSC::ExecutableAllocator::isValidExecutableMemory): Deleted.
(JSC::ExecutableAllocator::committedByteCount): Deleted.
(JSC::ExecutableAllocator::getLock const): Deleted.
* jsc.cpp:
(functionWebAssemblyMemoryMode):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/VM.cpp:
(JSC::enableAssembler):
(JSC::VM::canUseAssembler):
(JSC::VM::VM):
* runtime/VM.h:
* wasm/WasmCapabilities.h: Added.
(JSC::Wasm::isSupported):
* wasm/WasmFaultSignalHandler.cpp:
(JSC::Wasm::enableFastMemory):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/jit/ExecutableAllocator.cpp
Source/JavaScriptCore/jit/ExecutableAllocator.h
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/InitializeThreading.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSLock.cpp
Source/JavaScriptCore/runtime/Options.cpp
Source/JavaScriptCore/runtime/VM.cpp
Source/JavaScriptCore/runtime/VM.h
Source/JavaScriptCore/wasm/WasmCapabilities.h [new file with mode: 0644]
Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp