]> git.itanic.dy.fi Git - scan-pagemap/blobdiff - analyze.c
analyzer: Avoid ignoring mappings with only one reference
[scan-pagemap] / analyze.c
index 8280ff47712519a811d926c2697885a9f422652c..41299551b0b333402cd98b1bec2da31e69a72dcb 100644 (file)
--- a/analyze.c
+++ b/analyze.c
@@ -44,6 +44,11 @@ static void count_pages(struct bintree *b, struct bintree_ops *ops)
        if (af->pid) {
                if (!pf->ml)
                        return;
+               if (list_empty(&pf->ml->list)) {
+                       ml = list_to_maps_list(&pf->ml->list);
+                       if (ml->map->pid == af->pid)
+                               goto get_stats;
+               }
                list_for_each_entry(ml, &pf->ml->list, list) {
                        if (ml->map->pid == af->pid)
                                goto get_stats;