struct analyze_frames {
struct bintree_ops ops;
- long int present_pages;
- long int swapped_pages;
- long int unused_pages;
+ long int pages_present;
+ long int pages_swapped;
+ long int pages_unused;
};
#define bintree_ops_to_af(bintree_ops) \
struct analyze_frames *af = bintree_ops_to_af(ops);
if (pf->page_present) {
- af->present_pages += pf->refcount;
+ af->pages_present += pf->refcount;
} else if (pf->page_swapped) {
- af->swapped_pages += pf->refcount;
+ af->pages_swapped += pf->refcount;
} else {
- af->unused_pages += pf->refcount;
+ af->pages_unused += pf->refcount;
}
}
"Swapped pages: %ld, %lld %sB\n"
"Unused pages: %ld, %lld %sB\n"
"Total %ld physical pages, %lld %sB\n",
- af.present_pages,
- PAGE_TO_NICE(af.present_pages),
- PAGE_TO_NICE_UNIT(af.present_pages),
- af.swapped_pages,
- PAGE_TO_NICE(af.swapped_pages),
- PAGE_TO_NICE_UNIT(af.swapped_pages),
- af.unused_pages,
- PAGE_TO_NICE(af.unused_pages),
- PAGE_TO_NICE_UNIT(af.unused_pages),
+ af.pages_present,
+ PAGE_TO_NICE(af.pages_present),
+ PAGE_TO_NICE_UNIT(af.pages_present),
+ 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));