Changeset 181549 in webkit
- Timestamp:
- Mar 16, 2015, 5:20:59 AM (11 years ago)
- Location:
- releases/WebKitGTK/webkit-2.8/Source/JavaScriptCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
heap/Heap.cpp (modified) (2 diffs)
-
heap/IncrementalSweeper.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.8/Source/JavaScriptCore/ChangeLog
r181547 r181549 1 2015-03-12 Geoffrey Garen <ggaren@apple.com> 2 3 Prohibit GC while sweeping 4 https://bugs.webkit.org/show_bug.cgi?id=142638 5 6 Reviewed by Andreas Kling. 7 8 I noticed in https://bugs.webkit.org/show_bug.cgi?id=142636 that a GC 9 could trigger a sweep which could trigger another GC. Yo Dawg. 10 11 I tried to figure out whether this could cause problems or not and it 12 made me cross-eyed. 13 14 (Some clients like to report extra memory cost during deallocation as a 15 way to indicate that the GC now owns something exclusively. It's 16 arguably a bug to communicate with the GC in this way, but we shouldn't 17 do crazy when this happens.) 18 19 This patch makes explicit the fact that we don't allow GC while sweeping. 20 21 Usually, sweeping implicitly defers GC by virtue of happening during 22 allocation. But not always. 23 24 * heap/Heap.cpp: 25 (JSC::Heap::collectAllGarbage): Defer GC while sweeping due to an 26 explicit GC request. 27 28 (JSC::Heap::didFinishCollection): Make sure that zombifying sweep 29 defers GC by not returning to the non-GC state until we're all done. 30 31 * heap/IncrementalSweeper.cpp: 32 (JSC::IncrementalSweeper::sweepNextBlock): Defer GC while sweeping due 33 to a timer. 34 1 35 2015-03-13 Mark Lam <mark.lam@apple.com> 2 36 -
releases/WebKitGTK/webkit-2.8/Source/JavaScriptCore/heap/Heap.cpp
r181533 r181549 975 975 976 976 SamplingRegion samplingRegion("Garbage Collection: Sweeping"); 977 978 DeferGCForAWhile deferGC(*this); 977 979 m_objectSpace.sweep(); 978 980 m_objectSpace.shrink(); … … 1277 1279 if (Options::recordGCPauseTimes()) 1278 1280 HeapStatistics::recordGCPauseTime(gcStartTime, gcEndTime); 1281 1282 if (Options::useZombieMode()) 1283 zombifyDeadObjects(); 1284 1285 if (Options::objectsAreImmortal()) 1286 markDeadObjects(); 1287 1288 if (Options::showObjectStatistics()) 1289 HeapStatistics::showObjectStatistics(this); 1290 1291 if (Options::logGC() == GCLogging::Verbose) 1292 GCLogging::dumpObjectGraph(this); 1293 1279 1294 RELEASE_ASSERT(m_operationInProgress == EdenCollection || m_operationInProgress == FullCollection); 1280 1281 1295 m_operationInProgress = NoOperation; 1282 1296 JAVASCRIPTCORE_GC_END(); 1283 1284 if (Options::useZombieMode())1285 zombifyDeadObjects();1286 1287 if (Options::objectsAreImmortal())1288 markDeadObjects();1289 1290 if (Options::showObjectStatistics())1291 HeapStatistics::showObjectStatistics(this);1292 1293 if (Options::logGC() == GCLogging::Verbose)1294 GCLogging::dumpObjectGraph(this);1295 1297 } 1296 1298 -
releases/WebKitGTK/webkit-2.8/Source/JavaScriptCore/heap/IncrementalSweeper.cpp
r179728 r181549 91 91 continue; 92 92 93 DeferGCForAWhile deferGC(m_vm->heap); 93 94 block->sweep(); 94 95 m_vm->heap.objectSpace().freeOrShrinkBlock(block);
Note:
See TracChangeset
for help on using the changeset viewer.