⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 294377 in webkit


Ignore:
Timestamp:
May 17, 2022, 6:42:26 PM (4 years ago)
Author:
basuke.suzuki@sony.com
Message:

[WinCairo] Add memory usage of LibcMalloc category
​https://bugs.webkit.org/show_bug.cgi?id=239660

Reviewed by Ross Kirsling.

WinCairo's memory timeline just displays JavaScript memory usage. Adding
this info shows also Page
memory usage.

  • page/win/ResourceUsageThreadWin.cpp:

(WebCore::ResourceUsageThread::platformCollectMemoryData):

Canonical link: ​https://commits.webkit.org/250668@main

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/page/win/ResourceUsageThreadWin.cpp

    r278185 r294377  
    119119void ResourceUsageThread::platformCollectMemoryData(JSC::VM* vm, ResourceUsageData& data)
    120120{
    121     data.totalDirtySize = memoryUsage();
     121    auto usage = data.totalDirtySize = memoryUsage();
    122122
    123123    size_t currentGCHeapCapacity = vm->heap.blockBytesAllocated();
    … …  
    130130    data.categories[MemoryCategory::GCOwned].externalSize = currentGCOwnedExternal;
    131131
     132    usage -= currentGCHeapCapacity;
     133    // Following ResourceUsageThreadCocoa implementation
     134    auto currentGCOwnedGenerallyInMalloc = currentGCOwnedExtra - currentGCOwnedExternal;
     135    if (currentGCOwnedGenerallyInMalloc < usage)
     136        usage -= currentGCOwnedGenerallyInMalloc;
     137
     138    data.categories[MemoryCategory::LibcMalloc].dirtySize = usage;
     139
    132140    data.totalExternalSize = currentGCOwnedExternal;
    133141
Note: See TracChangeset for help on using the changeset viewer.