Changeset 204387 in webkit
- Timestamp:
- Aug 11, 2016, 2:18:14 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r204362 r204387 1 2016-08-10 Mark Lam <mark.lam@apple.com> 2 3 Disallow synchronous sweeping for eden GCs. 4 https://bugs.webkit.org/show_bug.cgi?id=160716 5 6 Reviewed by Geoffrey Garen. 7 8 * stress/eden-gc-with-retired-blocks.js: Added. 9 - This test is just in case we add back support for eden GCs with synchronous 10 sweeping in the future. 11 1 12 2016-08-10 Michael Saboff <msaboff@apple.com> 2 13 -
trunk/Source/JavaScriptCore/ChangeLog
r204373 r204387 1 2016-08-10 Mark Lam <mark.lam@apple.com> 2 3 Disallow synchronous sweeping for eden GCs. 4 https://bugs.webkit.org/show_bug.cgi?id=160716 5 6 Reviewed by Geoffrey Garen. 7 8 * heap/Heap.cpp: 9 (JSC::Heap::collectAllGarbage): 10 (JSC::Heap::collectAndSweep): Deleted. 11 * heap/Heap.h: 12 (JSC::Heap::collectAllGarbage): Deleted. 13 - No need for a separate collectAndSweep() anymore since we only call it for 14 FullCollections. 15 - Since we've already swept all the blocks, I cleared m_blockSnapshot so that the 16 IncrementalSweeper can bail earlier when it runs later. 17 18 * heap/MarkedBlock.cpp: 19 (JSC::MarkedBlock::sweepHelper): 20 - Removed the unreachable return statement. 21 22 * heap/MarkedBlock.h: 23 - Document what "Retired" means. 24 25 * tools/JSDollarVMPrototype.cpp: 26 (JSC::JSDollarVMPrototype::edenGC): 27 1 28 2016-08-11 Per Arne Vollan <pvollan@apple.com> 2 29 -
trunk/Source/JavaScriptCore/heap/Heap.cpp
r203375 r204387 1072 1072 } 1073 1073 1074 void Heap::collectA ndSweep(HeapOperation collectionType)1074 void Heap::collectAllGarbage() 1075 1075 { 1076 1076 if (!m_isSafeToCollect) 1077 1077 return; 1078 1078 1079 collect( collectionType);1079 collect(FullCollection); 1080 1080 1081 1081 DeferGCForAWhile deferGC(*this); 1082 1082 m_objectSpace.sweep(); 1083 1083 m_objectSpace.shrink(); 1084 m_blockSnapshot.clear(); 1084 1085 1085 1086 sweepAllLogicallyEmptyWeakBlocks(); -
trunk/Source/JavaScriptCore/heap/Heap.h
r203621 r204387 166 166 167 167 JS_EXPORT_PRIVATE void collectAllGarbageIfNotDoneRecently(); 168 void collectAllGarbage() { collectAndSweep(FullCollection); }169 JS_EXPORT_PRIVATE void collectAndSweep(HeapOperation collectionType = AnyCollection); 168 JS_EXPORT_PRIVATE void collectAllGarbage(); 169 170 170 bool shouldCollect(); 171 171 JS_EXPORT_PRIVATE void collect(HeapOperation collectionType = AnyCollection); -
trunk/Source/JavaScriptCore/heap/MarkedBlock.cpp
r203621 r204387 164 164 : specializedSweep<Marked, SweepOnly, callDestructors>(); 165 165 } 166 167 RELEASE_ASSERT_NOT_REACHED();168 return FreeList();169 166 } 170 167 -
trunk/Source/JavaScriptCore/heap/MarkedBlock.h
r203621 r204387 2 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 3 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 4 * Copyright (C) 2003 , 2004, 2005, 2006, 2007, 2008,2009, 2011, 2016 Apple Inc. All rights reserved.4 * Copyright (C) 2003-2009, 2011, 2016 Apple Inc. All rights reserved. 5 5 * 6 6 * This library is free software; you can redistribute it and/or … … 184 184 static const size_t atomAlignmentMask = atomSize - 1; 185 185 186 // During allocation, we look for available space in free lists in blocks. 187 // If a block's utilization is sufficiently high (i.e. it's almost full), 188 // we want to remove that block as a candidate for allocating to reduce 189 // the likelihood of allocation having to take a slow path. When the 190 // block is in this state, we say that it is "Retired". 191 // 192 // A full GC can take a Retired blocks out of retirement. An eden GC 193 // will simply ignore Retired blocks (i.e. they will not be swept even 194 // if they no longer have live objects). 195 186 196 enum BlockState { New, FreeListed, Allocated, Marked, Retired }; 187 197 template<bool callDestructors> FreeList sweepHelper(SweepMode = SweepOnly); -
trunk/Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp
r203375 r204387 130 130 if (!ensureCurrentThreadOwnsJSLock(exec)) 131 131 return; 132 exec->heap()->collect AndSweep(EdenCollection);132 exec->heap()->collect(EdenCollection); 133 133 } 134 134
Note:
See TracChangeset
for help on using the changeset viewer.