"given name\n"
"-m, --map=mapname scan maps with given mapping name\n"
"-d, --dump dump process maps\n"
+ "-s, --shared-mappings dump only shared mappings\n"
"-h, --help show this help\n",
name);
{ .val = 'm', .name = "map", .has_arg = 1, },
{ .val = OPT_WITH_THREADS, .name = "with-threads" },
{ .val = 'd', .name = "dump", },
+ { .val = 's', .name = "shared-mappings", },
{ .val = 'h', .name = "help", },
};
- char short_options[] = "p:P:m:dh";
+ char short_options[] = "p:P:m:sdh";
opts->parse_mask = 0;
while (1) {
case OPT_WITH_THREADS:
opts->with_threads = 1;
break;
+ case 's':
+ opts->parse_mask |= PARSE_SHARED_MAPPING;
+ /* implies --dump */
case 'd':
opts->parse_mask |= PARSE_DUMP;
break;
return 1;
if (opts.parse_mask & PARSE_DUMP)
- dump_process_maps(&process_list);
+ dump_process_maps(&pf, &process_list, &opts);
else
print_pid_stats(&pf, &process_list, &opts);