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

Unified Diff: third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp

Issue 1391933004: [Tracing] Add hook to PartitionAlloc for heap profiling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/PartitionAllocMemoryDumpProvider.cpp
diff --git a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
index 2a1bb6381f54f6c960c5d1aad81788f5d5705255..a7a214040f1995360f3d411a181a3bf24c8ee5ff 100644
--- a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
+++ b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp
@@ -115,4 +115,12 @@ PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider()
{
}
+void PartitionAllocMemoryDumpProvider::onHeapProfilingEnabled(AllocationHook* allocationHook, FreeHook* freeHook)
+{
+ // Make PartitionAlloc call |reportAllocation| and |reportFree| for every
+ // subsequent allocation and free (or not if the pointers are null).
+ partitionAllocHookAlloc = allocationHook;
+ partitionAllocHookFree = freeHook;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698