From 52cf500b2f5cbe16f991990d50ec990ab9540b97 Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Thu, 3 Nov 2011 14:54:41 +0200 Subject: [PATCH] Fix bug when showing process shared mappings The way page table tree is walked through nowadays requires that the process map data is incremented every time the page table tree is processed. Otherwise the last time the tree is processed, the counters are overwritten with the last values, which is most likely zeros. Signed-off-by: Timo Kokkonen --- analyze.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/analyze.c b/analyze.c index cd8d5db..a119fab 100644 --- a/analyze.c +++ b/analyze.c @@ -324,8 +324,8 @@ static void _dump_process_maps(struct rb_root *root, struct process *ps, af.map = map; count_pages(root, &af); - map->pages_present = af.pages_present; - map->pages_swapped = af.pages_swapped; + map->pages_present += af.pages_present; + map->pages_swapped += af.pages_swapped; } biggest = MAX(biggest, map->pages_present + map->pages_swapped); -- 2.45.0