]> git.itanic.dy.fi Git - scan-pagemap/commitdiff
parser: Populate the pageframe tree by scanning interesting pids first
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Wed, 14 Jul 2010 13:17:25 +0000 (16:17 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Wed, 14 Jul 2010 13:17:25 +0000 (16:17 +0300)
The "interesting" pids needs to be scanned always first, since later
on the pages from "noninteresting" pids are compared to the ones
already in the tree. We are optimizing by not storing anything out of
interest in the tree.

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

diff --git a/parse.c b/parse.c
index c4a0210b2d91de60933a02afd64dc1e097c0a232..58082869c846c8845599471ffee0c8eb87614d6e 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -328,6 +328,9 @@ void scan_all_pids(struct pageframe *pf, struct process **process_list,
 {
        int pid;
 
+       if (opts->parse_mask & PARSE_PID)
+               read_pageframe(opts->pid, pf, process_list, opts);
+
        while(1) {
                pid = get_next_pid();
                if (pid <= 0)