PAGE_TO_NICE(count),
PAGE_TO_NICE_UNIT(count));
}
+
+void print_pid_stats(struct pageframe *pf, struct process *process_list)
+{
+ struct process *ps;
+ struct maps *map;
+ long int swapped, present;
+
+ printf(" in ram swapped pid name\n");
+
+ list_for_each_entry(ps, &process_list->list, list) {
+ swapped = present = 0;
+
+ if (ps->maps)
+ list_for_each_entry(map, &ps->maps->list, list) {
+ present += map->pages_present;
+ swapped += map->pages_swapped;
+ }
+
+ if ((swapped + present) == 0)
+ continue;
+
+ printf("% 6lld %sB % 6lld %sB % 5d %s",
+ PAGE_TO_NICE(present), PAGE_TO_NICE_UNIT(present),
+ PAGE_TO_NICE(swapped), PAGE_TO_NICE_UNIT(swapped),
+ ps->pid, ps->name);
+ }
+}
#include "pagemap.h"
void print_page_stats(struct pageframe *pf);
+void print_pid_stats(struct pageframe *pf, struct process *process_list);
#endif