Changeset 240449 in webkit
- Timestamp:
- Jan 24, 2019 2:37:01 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r240447 r240449 1 2019-01-24 Yusuke Suzuki <ysuzuki@apple.com> 2 3 stress/const-semantics.js fails a dfg-eager / ftl-eager run with an ASAN release build. 4 https://bugs.webkit.org/show_bug.cgi?id=190693 5 6 Reviewed by Michael Saboff. 7 8 * stress/regress-190693.js: Added. 9 (truth): 10 (assert): 11 (shouldThrowInvalidConstAssignment): 12 (taz): 13 1 14 2019-01-24 Saam Barati <sbarati@apple.com> 2 15 -
trunk/Source/JavaScriptCore/ChangeLog
r240448 r240449 1 2019-01-24 Yusuke Suzuki <ysuzuki@apple.com> 2 3 stress/const-semantics.js fails a dfg-eager / ftl-eager run with an ASAN release build. 4 https://bugs.webkit.org/show_bug.cgi?id=190693 5 6 Reviewed by Michael Saboff. 7 8 JITStubRoutine's fields are marked only when JITStubRoutine::m_mayBeExecuting is true. 9 This becomes true when we find the executable address in our conservative roots, which 10 means that we could be executing it right now. This means that object liveness in 11 JITStubRoutine depends on the information gathered in ConservativeRoots. However, our 12 constraints are separated, "Conservative Scan" and "JIT Stub Routines". They can even 13 be executed concurrently, so that "JIT Stub Routines" may miss to mark the actually 14 executing JITStubRoutine because "Conservative Scan" finds it later. 15 When finalizing the GC, we delete the dead JITStubRoutines. At that time, since 16 "Conservative Scan" already finishes, we do not delete some JITStubRoutines which do not 17 mark the depending objects. Then, in the next cycle, we find JITStubRoutines still live, 18 attempt to mark the depending objects, and encounter the dead objects which are collected 19 in the previous cycles. 20 21 This patch removes "JIT Stub Routines" and merge it to "Conservative Scan". Since 22 "Conservative Scan" and "JIT Stub Routines" need to be executed only when the execution 23 happens (ensured by GreyedByExecution and CollectionPhase check), this change is OK for 24 GC stop time. 25 26 * heap/ConservativeRoots.h: 27 (JSC::ConservativeRoots::roots const): 28 (JSC::ConservativeRoots::roots): Deleted. 29 * heap/Heap.cpp: 30 (JSC::Heap::addCoreConstraints): 31 * heap/SlotVisitor.cpp: 32 (JSC::SlotVisitor::append): 33 * heap/SlotVisitor.h: 34 * jit/GCAwareJITStubRoutine.cpp: 35 (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine): 36 * jit/GCAwareJITStubRoutine.h: 37 1 38 2019-01-24 Saam Barati <sbarati@apple.com> 2 39 -
trunk/Source/JavaScriptCore/heap/ConservativeRoots.h
r235271 r240449 43 43 44 44 size_t size() const; 45 HeapCell** roots() ;45 HeapCell** roots() const; 46 46 47 47 private: … … 69 69 } 70 70 71 inline HeapCell** ConservativeRoots::roots() 71 inline HeapCell** ConservativeRoots::roots() const 72 72 { 73 73 return m_roots; -
trunk/Source/JavaScriptCore/heap/Heap.cpp
r240216 r240449 2622 2622 m_objectSpace.prepareForConservativeScan(); 2623 2623 2624 ConservativeRoots conservativeRoots(*this); 2625 SuperSamplerScope superSamplerScope(false); 2626 2627 gatherStackRoots(conservativeRoots); 2628 gatherJSStackRoots(conservativeRoots); 2629 gatherScratchBufferRoots(conservativeRoots); 2630 2631 SetRootMarkReasonScope rootScope(slotVisitor, SlotVisitor::RootMarkReason::ConservativeScan); 2632 slotVisitor.append(conservativeRoots); 2624 { 2625 ConservativeRoots conservativeRoots(*this); 2626 SuperSamplerScope superSamplerScope(false); 2627 2628 gatherStackRoots(conservativeRoots); 2629 gatherJSStackRoots(conservativeRoots); 2630 gatherScratchBufferRoots(conservativeRoots); 2631 2632 SetRootMarkReasonScope rootScope(slotVisitor, SlotVisitor::RootMarkReason::ConservativeScan); 2633 slotVisitor.append(conservativeRoots); 2634 } 2635 { 2636 // JITStubRoutines must be visited after scanning ConservativeRoots since JITStubRoutines depend on the hook executed during gathering ConservativeRoots. 2637 SetRootMarkReasonScope rootScope(slotVisitor, SlotVisitor::RootMarkReason::JITStubRoutines); 2638 m_jitStubRoutines->traceMarkedStubRoutines(slotVisitor); 2639 } 2633 2640 2634 2641 lastVersion = m_phaseVersion; … … 2694 2701 2695 2702 m_vm->shadowChicken().visitChildren(slotVisitor); 2696 },2697 ConstraintVolatility::GreyedByExecution);2698 2699 m_constraintSet->add(2700 "Jsr", "JIT Stub Routines",2701 [this] (SlotVisitor& slotVisitor) {2702 SetRootMarkReasonScope rootScope(slotVisitor, SlotVisitor::RootMarkReason::JITStubRoutines);2703 m_jitStubRoutines->traceMarkedStubRoutines(slotVisitor);2704 2703 }, 2705 2704 ConstraintVolatility::GreyedByExecution); -
trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp
r236296 r240449 135 135 } 136 136 137 void SlotVisitor::append( ConservativeRoots& conservativeRoots)137 void SlotVisitor::append(const ConservativeRoots& conservativeRoots) 138 138 { 139 139 HeapCell** roots = conservativeRoots.roots(); -
trunk/Source/JavaScriptCore/heap/SlotVisitor.h
r236296 r240449 87 87 Heap* heap() const; 88 88 89 void append( ConservativeRoots&);89 void append(const ConservativeRoots&); 90 90 91 91 template<typename T, typename Traits> void append(const WriteBarrierBase<T, Traits>&); -
trunk/Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp
r230748 r240449 44 44 const MacroAssemblerCodeRef<JITStubRoutinePtrTag>& code, VM& vm) 45 45 : JITStubRoutine(code) 46 , m_mayBeExecuting(false)47 , m_isJettisoned(false)48 46 { 49 47 vm.heap.m_jitStubRoutines->add(this); -
trunk/Source/JavaScriptCore/jit/GCAwareJITStubRoutine.h
r230748 r240449 68 68 friend class JITStubRoutineSet; 69 69 70 bool m_mayBeExecuting ;71 bool m_isJettisoned ;70 bool m_mayBeExecuting { false }; 71 bool m_isJettisoned { false }; 72 72 }; 73 73
Note: See TracChangeset
for help on using the changeset viewer.