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

Unified Diff: content/common/discardable_shared_memory_heap.h

Issue 1306243003: Add support to create memory allocator dump in base::DiscardableMemory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix html_viewer. Created 5 years, 4 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: content/common/discardable_shared_memory_heap.h
diff --git a/content/common/discardable_shared_memory_heap.h b/content/common/discardable_shared_memory_heap.h
index 7ded677c3cc75630b61181c16a4b20258943550e..5e482a6e7f4402b1651b624b6eb16e2820b91a5f 100644
--- a/content/common/discardable_shared_memory_heap.h
+++ b/content/common/discardable_shared_memory_heap.h
@@ -94,6 +94,13 @@ class CONTENT_EXPORT DiscardableSharedMemoryHeap {
uint64 tracing_process_id,
int32 segment_id);
+ // Returns a MemoryAllocatorDump for a given span on |pmd| with the size of
+ // the span.
+ base::trace_event::MemoryAllocatorDump* CreateMemoryAllocatorDump(
+ Span* span,
+ const char* name,
+ base::trace_event::ProcessMemoryDump* pmd) const;
+
private:
class ScopedMemorySegment {
public:
@@ -107,6 +114,13 @@ class CONTENT_EXPORT DiscardableSharedMemoryHeap {
bool IsUsed() const;
bool IsResident() const;
+ bool ContainsSpan(Span* span) const;
+
+ base::trace_event::MemoryAllocatorDump* CreateMemoryAllocatorDump(
+ Span* span,
+ const char* name,
+ base::trace_event::ProcessMemoryDump* pmd) const;
+
// Used for dumping memory statistics from the segment to chrome://tracing.
void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) const;
« no previous file with comments | « content/child/child_discardable_shared_memory_manager.cc ('k') | content/common/discardable_shared_memory_heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698