perf: Emit COMM records for existing processes
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 25 May 2016 18:28:45 +0000 (14:28 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 16 Jun 2016 15:48:38 +0000 (11:48 -0400)
We were emitting COMMs for new processes and MMAPs for old processes, but
not COMMs for old processes.  This meant that samples for existing
processes (e.g. during a sleep 10) would only have the PID, but not the
name of the process.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/profiler.c

index 9926407..2d54af8 100644 (file)
@@ -244,8 +244,10 @@ static void profiler_emit_current_system_status(void)
                nexterror();
        }
 
-       for (size_t i = 0; i < pset.num_processes; i++)
+       for (size_t i = 0; i < pset.num_processes; i++) {
+               profiler_notify_new_process(pset.procs[i]);
                enumerate_vmrs(pset.procs[i], enum_proc, pset.procs[i]);
+       }
 
        poperror();
        proc_free_set(&pset);