Changeset 121316 in webkit
- Timestamp:
- Jun 26, 2012, 8:44:05 PM (14 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/heap/IncrementalSweeper.cpp (modified) (1 diff)
-
JavaScriptCore/heap/MarkedBlock.h (modified) (1 diff)
-
JavaScriptCore/runtime/GCActivityCallback.cpp (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/bridge/runtime_object.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r121307 r121316 1 2012-06-26 Geoffrey Garen <ggaren@apple.com> 2 3 Reduced (but did not eliminate) use of "berzerker GC" 4 https://bugs.webkit.org/show_bug.cgi?id=89237 5 6 Reviewed by Gavin Barraclough. 7 8 (PART 2) 9 10 This part turns off "berzerker GC" and turns on incremental shrinking. 11 12 * heap/IncrementalSweeper.cpp: 13 (JSC::IncrementalSweeper::doSweep): Free or shrink after sweeping to 14 maintain the behavior we used to get from the occasional berzerker GC, 15 which would run all finalizers and then free or shrink all blocks 16 synchronously. 17 18 * heap/MarkedBlock.h: 19 (JSC::MarkedBlock::needsSweeping): Sweep zapped blocks, too. It's always 20 safe to sweep a zapped block (that's the point of zapping), and it's 21 sometimes profitable. For example, consider this case: Block A does some 22 allocation (transitioning Block A from Marked to FreeListed), then GC 23 happens (transitioning Block A to Zapped), then all objects in Block A 24 are free, then the incremental sweeper visits Block A. If we skipped 25 Zapped blocks, we'd skip Block A, even though it would be profitable to 26 run its destructors and free its memory. 27 28 * runtime/GCActivityCallback.cpp: 29 (JSC::DefaultGCActivityCallback::doWork): Don't sweep eagerly; we'll do 30 this incrementally. 31 1 32 2012-06-26 Filip Pizlo <fpizlo@apple.com> 2 33 -
trunk/Source/JavaScriptCore/heap/IncrementalSweeper.cpp
r121098 r121316 79 79 80 80 block->sweep(); 81 m_globalData->heap.objectSpace().freeOrShrinkBlock(block); 81 82 82 83 CFTimeInterval elapsedTime = WTF::monotonicallyIncreasingTime() - sweepBeginTime; -
trunk/Source/JavaScriptCore/heap/MarkedBlock.h
r119909 r121316 409 409 inline bool MarkedBlock::needsSweeping() 410 410 { 411 return m_state == Marked ;411 return m_state == Marked || m_state == Zapped; 412 412 } 413 413 -
trunk/Source/JavaScriptCore/runtime/GCActivityCallback.cpp
r120778 r121316 76 76 } 77 77 #endif 78 heap->collect AllGarbage();78 heap->collect(Heap::DoNotSweep); 79 79 } 80 80 -
trunk/Source/WebCore/ChangeLog
r121314 r121316 1 2012-06-26 Geoffrey Garen <ggaren@apple.com> 2 3 Reduced (but did not eliminate) use of "berzerker GC" 4 https://bugs.webkit.org/show_bug.cgi?id=89237 5 6 Reviewed by Gavin Barraclough. 7 8 (PART 2) 9 10 Don't ASSERT that RootObject's destructor runs and invalidates all 11 RuntimeObjects before their destructors run. 12 13 We don't guarantee this behavior because some RuntimeObjects may already 14 be garbage by the time RootObject's destructor runs, in which case 15 RootObject's weak pointers will be NULL, and RootObject will not call 16 invalidate() on them. 17 18 It's been theoretically possible for this ASSERT to fire for a while now. 19 This patch makes it fire all the time. 20 21 Luckily, we only needed the behavior guarded by this ASSERT for WebKit1 22 in Safari on Windows (cf. https://bugs.webkit.org/show_bug.cgi?id=61317), 23 to handle the way WebKit1 would unload plugin DLLs. If this ever becomes 24 an issue again, we can fix it by (a) not unloading plugin DLLs, 25 (b) migrating WebKit1 to the WebKit2 JS-plugin binding model, (c) making 26 the Instance pointer in a RuntimeObject an indirect pointer through 27 RootObject, or (c) giving RuntimeObject some sort of special way to 28 access a zombie weak pointer. 29 30 * bridge/runtime_object.cpp: 31 (JSC::Bindings::RuntimeObject::destroy): ASSERT removed. Anders said so. 32 1 33 2012-06-26 Douglas Stockwell <dstockwell@chromium.org> 2 34 -
trunk/Source/WebCore/bridge/runtime_object.cpp
r118616 r121316 52 52 void RuntimeObject::destroy(JSCell* cell) 53 53 { 54 RuntimeObject* thisObject = static_cast<RuntimeObject*>(cell); 55 ASSERT(!thisObject->m_instance); 56 thisObject->RuntimeObject::~RuntimeObject(); 54 static_cast<RuntimeObject*>(cell)->RuntimeObject::~RuntimeObject(); 57 55 } 58 56
Note:
See TracChangeset
for help on using the changeset viewer.