When scanning by a mapping name, we must first scan through all
processes to find out which processes are using the mappings. Then we
need to scan all pids again to find out if there are somewhere
physical pages that are being shared by the given mapping with a
different name.
Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
if (opts->parse_mask & PARSE_DUMP)
return 0;
+ if (opts->parse_mask & PARSE_MAP_NAME) {
+ while (1) {
+ pid = get_next_pid(&dir);
+ if (pid <= 0)
+ break;
+ read_pageframe_with_threads(pid, pf, process_list,
+ opts);
+ }
+ }
/* Do not add new pages in the tree after the initial scan */
opts->parse_mask |= PARSE_NOADD_TREE;