]> git.itanic.dy.fi Git - scan-pagemap/commitdiff
Analyzer: Do not report unused pages
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Fri, 23 Jul 2010 14:34:56 +0000 (17:34 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Fri, 23 Jul 2010 14:34:56 +0000 (17:34 +0300)
We are ignoring the unused pages anyway, so there is no good in
reporting them.

Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
analyze.c

index 41299551b0b333402cd98b1bec2da31e69a72dcb..3f3082489ae853e741e0990b7996e53ae1ee5919 100644 (file)
--- a/analyze.c
+++ b/analyze.c
@@ -28,7 +28,6 @@ struct analyze_frames {
        struct bintree_ops ops;
        long int pages_present;
        long int pages_swapped;
-       long int pages_unused;
        int pid;
 };
 
@@ -57,13 +56,10 @@ static void count_pages(struct bintree *b, struct bintree_ops *ops)
        }
 
 get_stats:
-       if (pf->page_present) {
+       if (pf->page_present)
                af->pages_present++;
-       } else if (pf->page_swapped) {
+       else if (pf->page_swapped)
                af->pages_swapped++;
-       } else {
-               af->pages_unused++;
-       }
 }
 
 /*
@@ -80,7 +76,6 @@ void print_page_stats(struct pageframe *pf)
        count = bintree_walk(&pf->tree, &af.ops);
        printf("present pages: %ld, %lld %sB\n"
                "Swapped pages: %ld, %lld %sB\n"
-               "Unused pages: %ld, %lld %sB\n"
                "Total %ld physical pages, %lld %sB\n",
                af.pages_present,
                PAGE_TO_NICE(af.pages_present),
@@ -88,9 +83,6 @@ void print_page_stats(struct pageframe *pf)
                af.pages_swapped,
                PAGE_TO_NICE(af.pages_swapped),
                PAGE_TO_NICE_UNIT(af.pages_swapped),
-               af.pages_unused,
-               PAGE_TO_NICE(af.pages_unused),
-               PAGE_TO_NICE_UNIT(af.pages_unused),
                count,
                PAGE_TO_NICE(count),
                PAGE_TO_NICE_UNIT(count));