Changeset 196251 in webkit
- Timestamp:
- Feb 8, 2016 8:25:22 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r196243 r196251 1 2016-02-08 Andreas Kling <akling@apple.com> 2 3 Visiting a WeakBlock should report bytes visited, since we reported them allocated. 4 <https://webkit.org/b/153978> 5 6 Reviewed by Darin Adler. 7 8 When creating a WeakBlock, we tell Heap that we've allocated 1 KB (WeakBlock::blockSize) 9 of memory. Consequently, when visiting a WeakBlock, we should also report 1 KB of memory 10 visited. Otherwise Heap will think that those 1 KB already went away. 11 12 This was causing us to underestimate heap size, which affects collection scheduling. 13 14 * heap/SlotVisitor.h: 15 (JSC::SlotVisitor::reportMemoryVisited): 16 * heap/WeakBlock.cpp: 17 (JSC::WeakBlock::visit): 18 1 19 2016-02-07 Saam barati <sbarati@apple.com> 2 20 -
trunk/Source/JavaScriptCore/heap/SlotVisitor.h
r190569 r196251 106 106 107 107 void reportExtraMemoryVisited(size_t); 108 void reportMemoryVisited(size_t bytes) { m_bytesVisited += bytes; } 108 109 109 110 void addWeakReferenceHarvester(WeakReferenceHarvester*); -
trunk/Source/JavaScriptCore/heap/WeakBlock.cpp
r191849 r196251 110 110 SlotVisitor& visitor = heapRootVisitor.visitor(); 111 111 112 visitor.reportMemoryVisited(WeakBlock::blockSize); 113 112 114 for (size_t i = 0; i < weakImplCount(); ++i) { 113 115 WeakImpl* weakImpl = &weakImpls()[i];
Note: See TracChangeset
for help on using the changeset viewer.