Index: third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h |
diff --git a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h |
index 84601b2299a0c66b5266d6d3214d802278ef5961..15ec7ac642d306295961703f6b99d9882b6b4df6 100644 |
--- a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h |
+++ b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h |
@@ -9,6 +9,16 @@ |
#include "public/platform/WebMemoryDumpProvider.h" |
#include "wtf/Allocator.h" |
#include "wtf/Noncopyable.h" |
+#include "wtf/OwnPtr.h" |
+#include "wtf/ThreadingPrimitives.h" |
+ |
+namespace base { |
+namespace trace_event { |
+ |
+class AllocationRegister; |
+ |
+} // namespace trace_event |
+} // namespace base |
namespace blink { |
@@ -22,10 +32,18 @@ public: |
// WebMemoryDumpProvider implementation. |
bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) override; |
bool supportsHeapProfiling() override { return true; } |
- void onHeapProfilingEnabled(AllocationHook*, FreeHook*) override; |
+ void onHeapProfilingEnabled(bool) override; |
+ |
+ // These methods are called only from PartitionAllocHooks' callbacks. |
+ void insert(void*, size_t, const char*); |
+ void remove(void*); |
private: |
PartitionAllocMemoryDumpProvider(); |
+ |
+ Mutex m_allocationRegisterMutex; |
+ OwnPtr<base::trace_event::AllocationRegister> m_allocationRegister; |
+ bool m_isHeapProfilingEnabled; |
}; |
} // namespace blink |