libsysprof: ignore swapper/# scheduler details

We "know" that the swapper runs between each process inherently so no need
to really include that in the scheduler details. It just clutters up the
event timeline. Without it, we're more likely to see patterns in the
scribbles.
This commit is contained in:
Christian Hergert
2023-09-07 13:18:41 -07:00
parent 75897deeeb
commit 5dc4e83307

View File

@ -77,10 +77,10 @@ sysprof_scheduler_details_event_cb (const SysprofPerfEvent *event,
goto finish;
if (self->started_at == 0 || end < self->started_at)
return;
goto finish;
if (self->ended_at != 0 && begin > self->ended_at)
return;
goto finish;
raw = event->tracepoint.raw;
@ -90,6 +90,12 @@ sysprof_scheduler_details_event_cb (const SysprofPerfEvent *event,
prev_comm[sizeof prev_comm-1] = 0;
/* Ignore the kswapper events because they just clutter up the
* timeline from things that would otherwise stand out.
*/
if (memcmp (prev_comm, "swapper/", strlen ("swapper/")) == 0)
goto finish;
g_snprintf (name, sizeof name, "CPU %u", cpu);
sysprof_capture_writer_add_mark (self->recording->writer,