libsysprof: only record process from perf, not threads

Otherwise we'll get additional SysprofCaptureProcess frames that relate
to the threads instead of just the processes.
This commit is contained in:
Christian Hergert
2023-05-22 18:35:35 -07:00
parent c2c4495e3c
commit 754e5df789

View File

@ -318,11 +318,12 @@ sysprof_perf_source_handle_event (SysprofPerfCounterEvent *event,
offset += sizeof (GPid) + sizeof (GPid);
memcpy (&time, event->comm.comm + offset, sizeof time);
sysprof_capture_writer_add_process (self->writer,
time,
cpu,
event->comm.pid,
event->comm.comm);
if (event->comm.pid == event->comm.tid)
sysprof_capture_writer_add_process (self->writer,
time,
cpu,
event->comm.pid,
event->comm.comm);
break;