JSC should have a forceGCSlowPaths option
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Oct 2015 09:15:35 +0000 (09:15 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Oct 2015 09:15:35 +0000 (09:15 +0000)
commit063dd397dd45b33db2794ad957f71a96a1301208
tree0473f4be8174647a1cd50074d334b37acb1c4bad
parent22a2cee21b27b6a0616ddce930f063a21128c80c
JSC should have a forceGCSlowPaths option
https://bugs.webkit.org/show_bug.cgi?id=150744

Reviewed by Filip Pizlo.

This patch implements the forceGCSlowPaths option.
It defaults to false, but when it is set to true,
the JITs will always allocate objects along the slow
path. This will be helpful for writing a certain class
of tests. This may also come in handy for debugging
later.

This patch also adds the "forceGCSlowPaths" function
in jsc.cpp which sets the option to true. If you
use this function in a jsc stress test, it's best
to call it as the first thing in the program before
we JIT anything.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::emitAllocateJSCell):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::allocateCell):
* jit/JITInlines.h:
(JSC::JIT::emitAllocateJSObject):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionEdenGC):
(functionForceGCSlowPaths):
(functionHeapSize):
* runtime/Options.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
Source/JavaScriptCore/jit/JITInlines.h
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/Options.h