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

Unified Diff: content/child/child_discardable_shared_memory_manager.cc

Issue 2391423004: Add UMA for PurgeAndSuspend. (Closed)
Patch Set: Fixed histograms.xml. Created 4 years, 2 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
« no previous file with comments | « content/child/child_discardable_shared_memory_manager.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_discardable_shared_memory_manager.cc
diff --git a/content/child/child_discardable_shared_memory_manager.cc b/content/child/child_discardable_shared_memory_manager.cc
index 44384491f1d4e739dadbe8a3851352bb11dc7bb0..1d1aa4c4591f0ba2aaacf3050aeb3e08ba6c4dc4 100644
--- a/content/child/child_discardable_shared_memory_manager.cc
+++ b/content/child/child_discardable_shared_memory_manager.cc
@@ -235,6 +235,15 @@ bool ChildDiscardableSharedMemoryManager::OnMemoryDump(
return heap_.OnMemoryDump(pmd);
}
+ChildDiscardableSharedMemoryManager::Statistics
+ChildDiscardableSharedMemoryManager::GetStatistics() const {
+ base::AutoLock lock(lock_);
+ Statistics stats;
+ stats.total_size = heap_.GetSize();
+ stats.freelist_size = heap_.GetSizeOfFreeLists();
+ return stats;
+}
+
void ChildDiscardableSharedMemoryManager::ReleaseFreeMemory() {
base::AutoLock lock(lock_);
« no previous file with comments | « content/child/child_discardable_shared_memory_manager.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698