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

Unified Diff: sync/syncable/directory.h

Issue 2084243004: [WIP][tracing] Add memory dump provider for sync Directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add visitors for memory. Created 4 years, 6 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: sync/syncable/directory.h
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h
index bdbfe95c6fa3f2b6504f5637ca9721bf0581b19b..6a6c7e7f29f18fa609335d5753f62de6bbd349fe 100644
--- a/sync/syncable/directory.h
+++ b/sync/syncable/directory.h
@@ -30,6 +30,12 @@
#include "sync/syncable/parent_child_index.h"
#include "sync/syncable/syncable_delete_journal.h"
+namespace base {
+namespace trace_event {
+class ProcessMemoryDump;
+}
+}
+
namespace syncer {
class Cryptographer;
@@ -283,6 +289,11 @@ class SYNC_EXPORT Directory {
// Gets the total number of entries in the directory.
size_t GetEntriesCount() const;
+ size_t GetApproximateMemoryUsage();
+
+ // Adds memory statistics to |pmd| for chrome://tracing.
+ void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd);
+
// Gets/Increments transaction version of a model type. Must be called when
// holding kernel mutex.
int64_t GetTransactionVersion(ModelType type) const;

Powered by Google App Engine
This is Rietveld 408576698