Changeset 153636 in webkit
- Timestamp:
- Aug 1, 2013, 11:09:05 PM (12 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r153635 r153636 1 2013-08-01 Mark Rowe <mrowe@apple.com> 2 3 <rdar://problem/14235491> FastMalloc zone enumerator responding to MALLOC_PTR_REGION_RANGE_TYPE with individual allocations 4 5 Teach PageMapMemoryUsageRecorder::recordPendingRegions to only record data of the type that it's asked for. 6 This also fixes the vmmap output to associate some regions with the FastMalloc malloc zone that were previously 7 associated with it only via the VM tag, meaning they were incorrectly being omitted from the malloc statistics 8 section of the report. 9 10 Reviewed by Dan Bernstein. 11 12 * wtf/FastMalloc.cpp: 13 (WTF::PageMapMemoryUsageRecorder::recordPendingRegions): Report the individual allocations only when requested. Add 14 the ability to report the regions containing pointers separately from the allocations. 15 1 16 2013-08-01 Mark Rowe <mrowe@apple.com> 2 17 -
trunk/Source/WTF/wtf/FastMalloc.cpp
r153455 r153636 4850 4850 void recordPendingRegions() 4851 4851 { 4852 if (!(m_typeMask & (MALLOC_PTR_IN_USE_RANGE_TYPE | MALLOC_PTR_REGION_RANGE_TYPE))) { 4852 bool recordRegionsContainingPointers = m_typeMask & MALLOC_PTR_REGION_RANGE_TYPE; 4853 bool recordAllocations = m_typeMask & MALLOC_PTR_IN_USE_RANGE_TYPE; 4854 4855 if (!recordRegionsContainingPointers && !recordAllocations) { 4853 4856 m_coalescedSpans.clear(); 4854 4857 return; 4855 4858 } 4856 4859 4860 Vector<vm_range_t, 256> pointerRegions; 4857 4861 Vector<vm_range_t, 1024> allocatedPointers; 4858 4862 for (size_t i = 0; i < m_coalescedSpans.size(); ++i) { 4859 4863 Span *theSpan = m_coalescedSpans[i]; 4860 if (theSpan->free)4861 continue;4862 4863 4864 vm_address_t spanStartAddress = theSpan->start << kPageShift; 4864 4865 vm_size_t spanSizeInBytes = theSpan->length * kPageSize; 4866 4867 if (recordRegionsContainingPointers) 4868 pointerRegions.append((vm_range_t){spanStartAddress, spanSizeInBytes}); 4869 4870 if (theSpan->free || !recordAllocations) 4871 continue; 4865 4872 4866 4873 if (!theSpan->sizeclass) { … … 4880 4887 } 4881 4888 4882 (*m_recorder)(m_task, m_context, m_typeMask & (MALLOC_PTR_IN_USE_RANGE_TYPE | MALLOC_PTR_REGION_RANGE_TYPE), allocatedPointers.data(), allocatedPointers.size()); 4889 if (recordRegionsContainingPointers) 4890 (*m_recorder)(m_task, m_context, MALLOC_PTR_REGION_RANGE_TYPE, pointerRegions.data(), pointerRegions.size()); 4891 4892 if (recordAllocations) 4893 (*m_recorder)(m_task, m_context, MALLOC_PTR_IN_USE_RANGE_TYPE, allocatedPointers.data(), allocatedPointers.size()); 4883 4894 4884 4895 m_coalescedSpans.clear();
Note:
See TracChangeset
for help on using the changeset viewer.