WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
128562.patch (text/plain), 4.44 KB, created by
Michael Saboff
on 2014-02-10 21:02:09 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Saboff
Created:
2014-02-10 21:02:09 PST
Size:
4.44 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 163854) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2014-02-10 Michael Saboff <msaboff@apple.com> >+ >+ Adjust VM::stackLimit based on the size of the largest FTL stack produced >+ https://bugs.webkit.org/show_bug.cgi?id=128562 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added VM::m_largestFTLStackSize to track the largest stack size of an FTL >+ compiled function. Added VM::m_FTLStackLimit for FTL stack limit. Changed >+ VM::setStackLimit to take into account m_largestFTLStackSize. >+ >+ * ftl/FTLJITFinalizer.cpp: >+ (JSC::FTL::JITFinalizer::finalizeFunction): >+ * runtime/VM.cpp: >+ (JSC::VM::VM): >+ (JSC::VM::updateFTLLargestStack): >+ * runtime/VM.h: >+ (JSC::VM::setStackLimit): >+ > 2014-02-10 Filip Pizlo <fpizlo@apple.com> > > FTL should support ToThis >Index: Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp (revision 163840) >+++ Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp (working copy) >@@ -136,7 +136,9 @@ bool JITFinalizer::finalizeFunction() > ("FTL entrypoint thunk for %s with LLVM generated code at %p", toCString(CodeBlockWithJITType(m_plan.codeBlock.get(), JITCode::FTLJIT)).data(), function))); > > m_plan.codeBlock->setJITCode(jitCode); >- >+ >+ m_plan.vm.updateFTLLargestStack(jitCode->stackmaps.stackSize()); >+ > if (m_plan.compilation) > m_plan.vm.m_perBytecodeProfiler->addCompilation(m_plan.compilation); > >Index: Source/JavaScriptCore/runtime/VM.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/VM.cpp (revision 163840) >+++ Source/JavaScriptCore/runtime/VM.cpp (working copy) >@@ -222,6 +222,10 @@ VM::VM(VMType vmType, HeapType heapType) > #if ENABLE(LLINT_C_LOOP) > , m_jsStackLimit(0) > #endif >+#if ENABLE(FTL_JIT) >+ , m_FTLStackLimit(0) >+ , m_largestFTLStackSize(0) >+#endif > , m_inDefineOwnProperty(false) > , m_codeCache(CodeCache::create()) > , m_enabledProfiler(nullptr) >@@ -739,6 +743,18 @@ size_t VM::updateStackLimitWithReservedZ > return oldReservedZoneSize; > } > >+#if ENABLE(FTL_JIT) >+void VM::updateFTLLargestStack(unsigned stackSize) >+{ >+ if (stackSize > m_largestFTLStackSize) { >+ unsigned deltaStackSize = stackSize - m_largestFTLStackSize; >+ m_largestFTLStackSize = stackSize; >+ m_stackLimit = reinterpret_cast<char*>(m_stackLimit) + deltaStackSize; >+ m_FTLStackLimit = reinterpret_cast<char*>(m_FTLStackLimit) + 2 * deltaStackSize; >+ } >+} >+#endif >+ > void releaseExecutableMemory(VM& vm) > { > vm.releaseExecutableMemory(); >Index: Source/JavaScriptCore/runtime/VM.h >=================================================================== >--- Source/JavaScriptCore/runtime/VM.h (revision 163840) >+++ Source/JavaScriptCore/runtime/VM.h (working copy) >@@ -380,6 +380,10 @@ namespace JSC { > size_t reservedZoneSize() const { return m_reservedZoneSize; } > size_t updateStackLimitWithReservedZoneSize(size_t reservedZoneSize); > >+#if ENABLE(FTL_JIT) >+ void updateFTLLargestStack(unsigned); >+#endif >+ > void** addressOfJSStackLimit() { return &m_jsStackLimit; } > #if ENABLE(LLINT_C_LOOP) > void* jsStackLimit() { return m_jsStackLimit; } >@@ -507,7 +511,7 @@ namespace JSC { > static VM*& sharedInstanceInternal(); > void createNativeThunk(); > >- void setStackLimit(void* limit) { m_stackLimit = limit; } >+ void setStackLimit(void* limit); > > #if ENABLE(ASSEMBLER) > bool m_canUseAssembler; >@@ -532,6 +536,10 @@ namespace JSC { > void* m_stackLimit; > void* m_jsStackLimit; > }; >+# if ENABLE(FTL_JIT) >+ void* m_FTLStackLimit; >+ unsigned m_largestFTLStackSize; >+# endif > #endif > void* m_lastStackTop; > JSValue m_exception; >@@ -556,6 +564,16 @@ namespace JSC { > } > #endif > >+ inline void VM::setStackLimit(void* limit) >+ { >+#if ENABLE(FTL_JIT) >+ m_stackLimit = reinterpret_cast<char*>(limit) + m_largestFTLStackSize; >+ m_FTLStackLimit = reinterpret_cast<char*>(m_stackLimit) + m_largestFTLStackSize; >+#else >+ m_stackLimit = limit; >+#endif >+ } >+ > inline Heap* WeakSet::heap() const > { > return &m_vm->heap;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mark.lam
:
review-
buildbot
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 128562
:
223803
|
223812
|
223966