mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: rename follow_fork() to follow_process()
This is more of what we want to be doing anyway, we don't care about all the forks in existence. Additionally, include the comm[] with the pid so that instruments can take action based on it.
This commit is contained in:
@ -122,11 +122,17 @@ sysprof_sampler_perf_event_stream_cb (const SysprofPerfEvent *event,
|
||||
memcpy (&time, event->comm.comm + offset, sizeof time);
|
||||
|
||||
if (event->comm.pid == event->comm.tid)
|
||||
sysprof_capture_writer_add_process (writer,
|
||||
time,
|
||||
cpu,
|
||||
event->comm.pid,
|
||||
event->comm.comm);
|
||||
{
|
||||
sysprof_capture_writer_add_process (writer,
|
||||
time,
|
||||
cpu,
|
||||
event->comm.pid,
|
||||
event->comm.comm);
|
||||
|
||||
_sysprof_recording_follow_process (recording,
|
||||
event->comm.pid,
|
||||
event->comm.comm);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -148,9 +154,6 @@ sysprof_sampler_perf_event_stream_cb (const SysprofPerfEvent *event,
|
||||
cpu,
|
||||
event->fork.ptid,
|
||||
event->fork.tid);
|
||||
|
||||
_sysprof_recording_follow_fork (recording, event->fork.tid);
|
||||
|
||||
break;
|
||||
|
||||
case PERF_RECORD_LOST:
|
||||
|
||||
Reference in New Issue
Block a user