Index: third_party/WebKit/Source/platform/heap/HeapPage.cpp |
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp |
index a94679f4db7bb3e4aeff837b82613f731354300c..f82cf1b68c70a1f54f90f7c74b0af7f0b436e6ec 100644 |
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp |
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp |
@@ -31,6 +31,8 @@ |
#include "config.h" |
#include "platform/heap/HeapPage.h" |
+#include "base/trace_event/memory_allocator_dump.h" |
+#include "base/trace_event/process_memory_dump.h" |
#include "platform/ScriptForbiddenScope.h" |
#include "platform/Task.h" |
#include "platform/TraceEvent.h" |
@@ -43,8 +45,6 @@ |
#include "platform/heap/SafePoint.h" |
#include "platform/heap/ThreadState.h" |
#include "public/platform/Platform.h" |
-#include "public/platform/WebMemoryAllocatorDump.h" |
-#include "public/platform/WebProcessMemoryDump.h" |
#include "wtf/Assertions.h" |
#include "wtf/ContainerAnnotations.h" |
#include "wtf/LeakAnnotations.h" |
@@ -97,6 +97,8 @@ |
namespace blink { |
+using base::trace_event::MemoryAllocatorDump; |
+ |
#if ENABLE(GC_PROFILING) |
static String classOf(const void* object) |
{ |
@@ -154,7 +156,7 @@ void BaseHeap::cleanupPages() |
void BaseHeap::takeSnapshot(const String& dumpBaseName, ThreadState::GCSnapshotInfo& info) |
{ |
// |dumpBaseName| at this point is "blink_gc/thread_X/heaps/HeapName" |
- WebMemoryAllocatorDump* allocatorDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpBaseName); |
+ MemoryAllocatorDump* allocatorDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpBaseName); |
size_t pageIndex = 0; |
size_t heapTotalFreeSize = 0; |
size_t heapTotalFreeCount = 0; |
@@ -478,8 +480,8 @@ bool NormalPageHeap::pagesToBeSweptContains(Address address) |
void NormalPageHeap::takeFreelistSnapshot(const String& dumpName) |
{ |
if (m_freeList.takeSnapshot(dumpName)) { |
- WebMemoryAllocatorDump* bucketsDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName + "/buckets"); |
- WebMemoryAllocatorDump* pagesDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName + "/pages"); |
+ MemoryAllocatorDump* bucketsDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName + "/buckets"); |
+ MemoryAllocatorDump* pagesDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName + "/pages"); |
BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->AddOwnershipEdge(pagesDump->guid(), bucketsDump->guid()); |
} |
} |
@@ -1140,7 +1142,7 @@ bool FreeList::takeSnapshot(const String& dumpBaseName) |
} |
String dumpName = dumpBaseName + String::format("/buckets/bucket_%lu", static_cast<unsigned long>(1 << i)); |
- WebMemoryAllocatorDump* bucketDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName); |
+ MemoryAllocatorDump* bucketDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName); |
bucketDump->AddScalar("free_count", "objects", entryCount); |
bucketDump->AddScalar("free_size", "bytes", freeSize); |
didDumpBucketStats = true; |
@@ -1489,7 +1491,7 @@ void NormalPage::markOrphaned() |
void NormalPage::takeSnapshot(String dumpName, size_t pageIndex, ThreadState::GCSnapshotInfo& info, size_t* outFreeSize, size_t* outFreeCount) |
{ |
dumpName.append(String::format("/pages/page_%lu", static_cast<unsigned long>(pageIndex))); |
- WebMemoryAllocatorDump* pageDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName); |
+ MemoryAllocatorDump* pageDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName); |
HeapObjectHeader* header = nullptr; |
size_t liveCount = 0; |
@@ -1708,7 +1710,7 @@ void LargeObjectPage::markOrphaned() |
void LargeObjectPage::takeSnapshot(String dumpName, size_t pageIndex, ThreadState::GCSnapshotInfo& info, size_t* outFreeSize, size_t* outFreeCount) |
{ |
dumpName.append(String::format("/pages/page_%lu", static_cast<unsigned long>(pageIndex))); |
- WebMemoryAllocatorDump* pageDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName); |
+ MemoryAllocatorDump* pageDump = BlinkGCMemoryDumpProvider::instance()->createMemoryAllocatorDumpForCurrentGC(dumpName); |
size_t liveSize = 0; |
size_t deadSize = 0; |