Changeset 161174 in webkit
- Timestamp:
- Dec 30, 2013 11:22:21 PM (10 years ago)
- Location:
- branches/jsCStack/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/jsCStack/Source/JavaScriptCore/ChangeLog
r161172 r161174 1 2013-12-30 Mark Lam <mark.lam@apple.com> 2 3 CStack: Introduce tracking of the top VMEntryScope. 4 https://bugs.webkit.org/show_bug.cgi?id=126334. 5 6 Not yet reviewed. 7 8 When we start measuring the stack usage of each VMEntryScope, we'll need 9 to know which VMEntryScope is the top (most recent) one, not just the 10 first one. 11 12 Also, for correctness, in JSStack::updateStackLimit(), when we set a new 13 jsStackLimit, we should set it on the top VMEntryScope, and not on the 14 first (oldest) one. This is because the 2 scopes may be on 2 different 15 thread stacks, and the most present stack limits only apply to the most 16 recent scope. That said, presently, VMEntryScope::updateStackLimits() 17 does not rely on any scope specific data yet. So, calling updateStackLimits() 18 on the oldest VMEntryScope hasn't manifested any issues yet. Regardless, 19 this is now fixed. 20 21 * interpreter/JSStack.cpp: 22 (JSC::JSStack::updateStackLimit): 23 * runtime/VM.cpp: 24 (JSC::VM::VM): 25 * runtime/VM.h: 26 * runtime/VMEntryScope.cpp: 27 (JSC::VMEntryScope::VMEntryScope): 28 (JSC::VMEntryScope::~VMEntryScope): 29 * runtime/VMEntryScope.h: 30 1 31 2013-12-30 Mark Lam <mark.lam@apple.com> 2 32 -
branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.cpp
r161172 r161174 205 205 disableErrorStackReserve(); 206 206 #endif 207 if (m_vm. firstEntryScope)208 m_vm. firstEntryScope->updateStackLimits();207 if (m_vm.topEntryScope) 208 m_vm.topEntryScope->updateStackLimits(); 209 209 } 210 210 -
branches/jsCStack/Source/JavaScriptCore/runtime/VM.cpp
r161104 r161174 200 200 , sizeOfLastScratchBuffer(0) 201 201 , firstEntryScope(0) 202 , topEntryScope(0) 202 203 , m_enabledProfiler(0) 203 204 , m_regExpCache(new RegExpCache(this)) -
branches/jsCStack/Source/JavaScriptCore/runtime/VM.h
r161172 r161174 428 428 429 429 VMEntryScope* firstEntryScope; 430 VMEntryScope* topEntryScope; 430 431 431 432 HashSet<JSObject*> stringRecursionCheckVisitedObjects; -
branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.cpp
r161172 r161174 37 37 , m_globalObject(globalObject) 38 38 , m_prevFirstEntryScope(vm.firstEntryScope) 39 , m_prevTopEntryScope(vm.topEntryScope) 39 40 , m_prevStackLimit(vm.stackLimit()) 40 41 #if !ENABLE(LLINT_C_LOOP) … … 54 55 vm.resetDateCache(); 55 56 } 56 // Clear the exception stack between entries 57 vm.topEntryScope = this; 58 59 // Clear the captured exception stack between entries 57 60 vm.clearExceptionStack(); 58 61 … … 64 67 { 65 68 m_vm.firstEntryScope = m_prevFirstEntryScope; 69 m_vm.topEntryScope = m_prevTopEntryScope; 66 70 m_vm.setStackLimit(m_prevStackLimit); 67 71 #if !ENABLE(LLINT_C_LOOP) -
branches/jsCStack/Source/JavaScriptCore/runtime/VMEntryScope.h
r161172 r161174 58 58 // The following pointers may point to a different thread's stack. 59 59 VMEntryScope* m_prevFirstEntryScope; 60 VMEntryScope* m_prevTopEntryScope; 60 61 void* m_prevStackLimit; 61 62 #if !ENABLE(LLINT_C_LOOP)
Note: See TracChangeset
for help on using the changeset viewer.