From: Timo Kokkonen Date: Fri, 23 Jul 2010 14:34:56 +0000 (+0300) Subject: Analyzer: Do not report unused pages X-Git-Url: http://git.itanic.dy.fi/?p=scan-pagemap;a=commitdiff_plain;h=18bffb6096798f653bcb44453a82ae92e9c0d0b5 Analyzer: Do not report unused pages We are ignoring the unused pages anyway, so there is no good in reporting them. Signed-off-by: Timo Kokkonen --- diff --git a/analyze.c b/analyze.c index 4129955..3f30824 100644 --- 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));