]> git.itanic.dy.fi Git - scan-pagemap/commitdiff
Revert "Fix bug when showing process shared mappings"
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 4 Jun 2012 19:40:28 +0000 (22:40 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 4 Jun 2012 19:48:39 +0000 (22:48 +0300)
This reverts commit 52cf500b2f5cbe16f991990d50ec990ab9540b97.

The previous commit was causing the allocated pages reported by the
'-s' option to be doubled. That is clearly wrong.

As I can not remember anymore what I was thinking when I wrote the
commit and I can only see how wrong it is, I see no reason to not
revert it.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
analyze.c

index 3468d92cc1f8e24c3879db7e964a9b975ee88e01..48452f82ef5d08ce6cf25492c4635e97764e9c9f 100644 (file)
--- 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);