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

Unified Diff: content/common/discardable_shared_memory_heap.h

Issue 1100073004: Adding discardable memory dump provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments. Created 5 years, 8 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 23b9cfb87d237dc1a4016dc029a0086aaf05fca1..21607dd3532437490050c7a48032854fe2b94f58 100644
--- a/content/common/discardable_shared_memory_heap.h
+++ b/content/common/discardable_shared_memory_heap.h
@@ -10,6 +10,7 @@
#include "base/containers/linked_list.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
+#include "base/trace_event/process_memory_dump.h"
#include "content/common/content_export.h"
namespace base {
@@ -83,6 +84,9 @@ class CONTENT_EXPORT DiscardableSharedMemoryHeap {
// Returns bytes of memory currently in the free lists.
size_t GetSizeOfFreeLists() const;
+ // Dumps memory statistics for chrome://tracing.
+ bool DumpMemoryStatisticsInto(base::trace_event::ProcessMemoryDump* pmd);
+
private:
class ScopedMemorySegment {
public:
@@ -96,6 +100,8 @@ class CONTENT_EXPORT DiscardableSharedMemoryHeap {
bool IsResident() const;
private:
+ friend class DiscardableSharedMemoryHeap;
reveman 2015/04/24 14:19:36 hm, sorry I missed this in my previous review. Wha
ssid 2015/04/27 11:19:21 Yes, I tried to explain this indirection in last p
+
DiscardableSharedMemoryHeap* const heap_;
scoped_ptr<base::DiscardableSharedMemory> shared_memory_;
const size_t size_;
reveman 2015/04/24 14:19:36 I think we should add "const DiscardableSharedMemo
ssid 2015/04/27 11:19:21 Done.

Powered by Google App Engine
This is Rietveld 408576698