From 18bffb6096798f653bcb44453a82ae92e9c0d0b5 Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Fri, 23 Jul 2010 17:34:56 +0300 Subject: [PATCH] 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 --- analyze.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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)); -- 2.44.0