]> git.itanic.dy.fi Git - scan-pagemap/commitdiff
Parser: Remove support for parsing processes by name
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Sat, 21 Aug 2010 08:57:10 +0000 (11:57 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Sat, 21 Aug 2010 08:57:10 +0000 (11:57 +0300)
This is no longer needed since process names are converted to pids
already in main.c function.

Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
pagemap.h
parse.c

index 3754063af8fd864424091c043a61bf68bb8fd089..4bb1302d3bc7e563bb3ab24fb960e5600da5ecf6 100644 (file)
--- a/pagemap.h
+++ b/pagemap.h
@@ -102,7 +102,6 @@ struct process {
 
 #define PARSE_PID              0x1
 #define PARSE_MAP_NAME         0x2
-#define PARSE_PROCESS_NAME     0x4
 #define PARSE_DUMP             0x8
 #define PARSE_NOADD_TREE       0x10
 
diff --git a/parse.c b/parse.c
index 6434b72c9b498c116dc66df39c42e06deae4d0ad..b3c87e2087a9bff2dcce012a6197c222b3b87ca8 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -107,12 +107,6 @@ static int should_scan_process(struct parse_opts *opts, struct process *process)
        int match = 0;
        char *name;
 
-       if (is_parse_option(opts, PARSE_PROCESS_NAME)) {
-               name = get_name_by_pid(process->pid);
-               if (!strcmp(opts->name, name ? name : ""))
-                       match = 1;
-       }
-
        if (is_parse_option(opts, PARSE_PID)) {
                list_for_each_entry(pid, &opts->pidlist, list) {
                        if (pid->pid == process->pid) {
@@ -342,15 +336,6 @@ int scan_all_pids(struct pageframe *pf, struct process *process_list,
        int pid;
        int count = 0;
 
-       if (is_parse_option(opts, PARSE_PROCESS_NAME)) {
-               while ((pid = get_next_pid_by_name(&dir, opts->name))) {
-                       count += read_pageframe_with_threads(pid, pf,
-                                                       process_list,
-                                                       opts);
-               }
-               dir = NULL;
-       }
-
        if (is_parse_option(opts, PARSE_PID)) {
                list_for_each_entry(pidlist, &opts->pidlist, list) {
                        count += read_pageframe_with_threads(pidlist->pid, pf,