Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(832)

Unified Diff: third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
diff --git a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
index 73c78c7bf4bc474d16c951bd7f1dbc46b68b7575..adc5ebaf7cb2cd327b06063a8107ea16d6023d80 100644
--- a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
+++ b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
@@ -21,14 +21,14 @@ void dumpMemoryTotals(blink::WebProcessMemoryDump* memoryDump)
{
String dumpName = String::format("blink_gc");
WebMemoryAllocatorDump* allocatorDump = memoryDump->createMemoryAllocatorDump(dumpName);
- allocatorDump->addScalar("size", "bytes", Heap::allocatedSpace());
+ allocatorDump->addScalar("size", "bytes", ProcessHeap::totalAllocatedSpace());
dumpName.append("/allocated_objects");
WebMemoryAllocatorDump* objectsDump = memoryDump->createMemoryAllocatorDump(dumpName);
- // Heap::markedObjectSize() can be underestimated if we're still in the
+ // ThreadHeap::markedObjectSize() can be underestimated if we're still in the
// process of lazy sweeping.
- objectsDump->addScalar("size", "bytes", Heap::allocatedObjectSize() + Heap::markedObjectSize());
+ objectsDump->addScalar("size", "bytes", ProcessHeap::totalAllocatedObjectSize() + ProcessHeap::totalMarkedObjectSize());
}
void reportAllocation(Address address, size_t size, const char* typeName)
@@ -58,7 +58,7 @@ bool BlinkGCMemoryDumpProvider::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfD
// In the case of a detailed dump perform a mark-only GC pass to collect
// more detailed stats.
if (levelOfDetail == WebMemoryDumpLevelOfDetail::Detailed)
- Heap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::TakeSnapshot, BlinkGC::ForcedGC);
+ ThreadHeap::collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::TakeSnapshot, BlinkGC::ForcedGC);
dumpMemoryTotals(memoryDump);
if (m_isHeapProfilingEnabled) {
@@ -76,7 +76,7 @@ bool BlinkGCMemoryDumpProvider::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfD
memoryDump->dumpHeapUsage(bytesByContext, overhead, "blink_gc");
}
- // Merge all dumps collected by Heap::collectGarbage.
+ // Merge all dumps collected by ThreadHeap::collectGarbage.
if (levelOfDetail == WebMemoryDumpLevelOfDetail::Detailed)
memoryDump->takeAllDumpsFrom(m_currentProcessMemoryDump.get());
return true;
« no previous file with comments | « third_party/WebKit/Source/platform/heap/BlinkGC.h ('k') | third_party/WebKit/Source/platform/heap/GarbageCollected.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698