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

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

Issue 1711643002: Show type names in Oilpan heap profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue-585063-impl-hooks
Patch Set: Created 4 years, 10 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 6f924c190fddf649300923184ea073b1df57045a..abd9b811a168cfcc63542156b95198913b9414c0 100644
--- a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
+++ b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp
@@ -31,9 +31,9 @@ void dumpMemoryTotals(blink::WebProcessMemoryDump* memoryDump)
objectsDump->addScalar("size", "bytes", Heap::allocatedObjectSize() + Heap::markedObjectSize());
}
-void reportAllocation(Address address, size_t size)
+void reportAllocation(Address address, size_t size, const char* typeName)
{
- BlinkGCMemoryDumpProvider::instance()->insert(address, size);
+ BlinkGCMemoryDumpProvider::instance()->insert(address, size, typeName);
}
void reportFree(Address address)
@@ -114,11 +114,10 @@ BlinkGCMemoryDumpProvider::BlinkGCMemoryDumpProvider()
{
}
-void BlinkGCMemoryDumpProvider::insert(Address address, size_t size)
+void BlinkGCMemoryDumpProvider::insert(Address address, size_t size, const char* typeName)
{
base::trace_event::AllocationContext context = base::trace_event::AllocationContextTracker::GetContextSnapshot();
- // TODO(hajimehoshi): Implement to use a correct type name.
- context.type_name = "";
+ context.type_name = typeName;
MutexLocker locker(m_allocationRegisterMutex);
if (m_allocationRegister)
m_allocationRegister->Insert(address, size, context);
« no previous file with comments | « third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h ('k') | third_party/WebKit/Source/platform/heap/Heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698