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

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

Issue 1701813003: Heap Profiling for Oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change base_name 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.h
diff --git a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h
index e855ab37c8bf133847c097def67d6abcba1ec461..e0166d88c318e358b9b81a8ab6d211e3b3d9759b 100644
--- a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h
+++ b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h
@@ -6,11 +6,21 @@
#define BlinkGCMemoryDumpProvider_h
#include "platform/PlatformExport.h"
+#include "platform/heap/BlinkGC.h"
#include "public/platform/WebMemoryDumpProvider.h"
#include "wtf/Allocator.h"
#include "wtf/OwnPtr.h"
+#include "wtf/ThreadingPrimitives.h"
#include "wtf/text/WTFString.h"
+namespace base {
+namespace trace_event {
+
+class AllocationRegister;
+
+} // namespace trace_event
+} // namespace base
+
namespace blink {
class WebMemoryAllocatorDump;
@@ -22,6 +32,8 @@ public:
// WebMemoryDumpProvider implementation.
bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) override;
+ bool supportsHeapProfiling() override { return true; }
+ void onHeapProfilingEnabled(bool) override;
// The returned WebMemoryAllocatorDump is owned by
// BlinkGCMemoryDumpProvider, and should not be retained (just used to
@@ -34,10 +46,16 @@ public:
WebProcessMemoryDump* currentProcessMemoryDump() { return m_currentProcessMemoryDump.get(); }
+ void insert(Address, size_t);
+ void remove(Address);
+
private:
BlinkGCMemoryDumpProvider();
+ Mutex m_allocationRegisterMutex;
+ OwnPtr<base::trace_event::AllocationRegister> m_allocationRegister;
OwnPtr<WebProcessMemoryDump> m_currentProcessMemoryDump;
+ bool m_isHeapProfilingEnabled;
};
} // namespace blink
« no previous file with comments | « content/child/web_process_memory_dump_impl.cc ('k') | third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698