Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4075b8460d2c901a010f317dfde6a1d20e3f32b4
      
https://github.com/WebKit/WebKit/commit/4075b8460d2c901a010f317dfde6a1d20e3f32b4
  Author: Simon Fraser <[email protected]>
  Date:   2023-02-14 (Tue, 14 Feb 2023)

  Changed paths:
    M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
    M Source/JavaScriptCore/Sources.txt
    M Source/JavaScriptCore/bytecode/GetByStatus.cpp
    M Source/JavaScriptCore/bytecode/GetByStatus.h
    M Source/JavaScriptCore/bytecode/PutByStatus.cpp
    M Source/JavaScriptCore/bytecode/PutByStatus.h
    M Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
    M Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
    M Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.cpp
    M Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.h
    M Source/JavaScriptCore/heap/GigacageAlignedMemoryAllocator.cpp
    M Source/JavaScriptCore/heap/Heap.cpp
    M Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.cpp
    M Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.h
    M Source/JavaScriptCore/heap/IsoSubspace.h
    M Source/JavaScriptCore/heap/IsoSubspacePerVM.h
    A Source/JavaScriptCore/jit/JITCodeMap.cpp
    M Source/JavaScriptCore/jit/JITCodeMap.h
    A Source/JavaScriptCore/runtime/HasOwnPropertyCache.cpp
    M Source/JavaScriptCore/runtime/HasOwnPropertyCache.h
    M Source/JavaScriptCore/runtime/VM.h

  Log Message:
  -----------
  Make more JavaScriptCore allocations use heap identifiers
https://bugs.webkit.org/show_bug.cgi?id=252104
rdar://105315215

Reviewed by Yusuke Suzuki.

When BENABLE_MALLOC_HEAP_BREAKDOWN and ENABLE_MALLOC_HEAP_BREAKDOWN are 
defined, we use multiple debug heaps
with identifiers to make it easier to determine what is using memory when using 
system memory tools.

Break down more of the "WebKit Using System Malloc" heap by assigning heap 
identifiers to more allocations
in JavaScriptCore. These were motivated by tracking the largest uncategorized 
live allocations, via
TRACK_MALLOC_CALLSTACK.

WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER() is added for GetByStatus, 
PutByStatus, UnlinkedCodeBlock_RareData,
UnlinkedMetadataTable, JITCodeMap, HasOwnPropertyCache and VM.

IsoAlignedMemoryAllocator gets its own DebugHeap just like 
GigacageAlignedMemoryAllocator.

* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/bytecode/GetByStatus.cpp:
* Source/JavaScriptCore/bytecode/GetByStatus.h:
* Source/JavaScriptCore/bytecode/PutByStatus.cpp:
* Source/JavaScriptCore/bytecode/PutByStatus.h:
* Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:
* Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h:
* Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.cpp:
* Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.h:
* Source/JavaScriptCore/heap/GigacageAlignedMemoryAllocator.cpp:
(JSC::GigacageAlignedMemoryAllocator::GigacageAlignedMemoryAllocator): Shorten 
the name to make output more readable.
* Source/JavaScriptCore/heap/Heap.cpp:
* Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.cpp:
(JSC::IsoAlignedMemoryAllocator::IsoAlignedMemoryAllocator):
(JSC::IsoAlignedMemoryAllocator::tryAllocateMemory):
(JSC::IsoAlignedMemoryAllocator::freeMemory):
(JSC::IsoAlignedMemoryAllocator::tryMallocBlock):
(JSC::IsoAlignedMemoryAllocator::freeBlock):
* Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.h:
* Source/JavaScriptCore/heap/IsoSubspace.h: Shorten the name to make output 
more readable.
* Source/JavaScriptCore/heap/IsoSubspacePerVM.h: Ditto.
* Source/JavaScriptCore/jit/JITCodeMap.cpp: Copied from 
Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.h.
* Source/JavaScriptCore/jit/JITCodeMap.h:
(JSC::JITCodeMap::JITCodeMap):
* Source/JavaScriptCore/runtime/HasOwnPropertyCache.cpp: Copied from 
Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.h.
* Source/JavaScriptCore/runtime/HasOwnPropertyCache.h:
(JSC::HasOwnPropertyCache::operator delete):
(JSC::HasOwnPropertyCache::create):
* Source/JavaScriptCore/runtime/VM.h:

Canonical link: https://commits.webkit.org/260257@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to