From d9a109d8dc09a519108e5a7881b5186ab64b1c22 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 29 Jun 2008 15:16:34 +0000 Subject: [PATCH] "caches" also prints the total number of pages assigned to caches and the total amount of committed memory. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26165 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 81f939117e..70e2d9e2e0 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -3219,6 +3219,8 @@ dump_caches(int argc, char **argv) uint32 totalCount = 0; uint32 rootCount = 0; + off_t totalCommitted = 0; + page_num_t totalPages = 0; vm_cache* cache = gDebugCacheList; while (cache) { @@ -3229,6 +3231,8 @@ dump_caches(int argc, char **argv) info.page_count = 0; info.committed = 0; update_cache_info_recursively(cache, info); + totalCommitted += info.committed; + totalPages += info.page_count; } cache = cache->debug_next; @@ -3238,6 +3242,8 @@ dump_caches(int argc, char **argv) sortByPageCount ? &cache_info_compare_page_count : &cache_info_compare_committed); + kprintf("total committed memory: %lld, total used pages: %lu\n", + totalCommitted, totalPages); kprintf("%lu caches (%lu root caches), sorted by %s per cache " "tree...\n\n", totalCount, rootCount, sortByPageCount ? "page count" : "committed size");