mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 15:10:53 +00:00
perf-source: we need PERF_SAMPLE_TID
I mistakingly removed this, which caused us to not get sample delivery.
This commit is contained in:
@ -189,6 +189,7 @@ sp_perf_source_handle_event (SpPerfCounterEvent *event,
|
|||||||
case PERF_RECORD_COMM:
|
case PERF_RECORD_COMM:
|
||||||
offset = strlen (event->comm.comm) + 1;
|
offset = strlen (event->comm.comm) + 1;
|
||||||
realign (&offset, sizeof (guint64));
|
realign (&offset, sizeof (guint64));
|
||||||
|
offset += sizeof (GPid) + sizeof (GPid);
|
||||||
memcpy (&time, event->comm.comm + offset, sizeof time);
|
memcpy (&time, event->comm.comm + offset, sizeof time);
|
||||||
|
|
||||||
sp_capture_writer_add_process (self->writer,
|
sp_capture_writer_add_process (self->writer,
|
||||||
@ -239,6 +240,7 @@ sp_perf_source_handle_event (SpPerfCounterEvent *event,
|
|||||||
case PERF_RECORD_MMAP:
|
case PERF_RECORD_MMAP:
|
||||||
offset = strlen (event->mmap.filename) + 1;
|
offset = strlen (event->mmap.filename) + 1;
|
||||||
realign (&offset, sizeof (guint64));
|
realign (&offset, sizeof (guint64));
|
||||||
|
offset += sizeof (GPid) + sizeof (GPid);
|
||||||
memcpy (&time, event->mmap.filename + offset, sizeof time);
|
memcpy (&time, event->mmap.filename + offset, sizeof time);
|
||||||
|
|
||||||
sp_capture_writer_add_map (self->writer,
|
sp_capture_writer_add_map (self->writer,
|
||||||
@ -281,6 +283,7 @@ sp_perf_source_start_pid (SpPerfSource *self,
|
|||||||
g_assert (SP_IS_PERF_SOURCE (self));
|
g_assert (SP_IS_PERF_SOURCE (self));
|
||||||
|
|
||||||
attr.sample_type = PERF_SAMPLE_IP
|
attr.sample_type = PERF_SAMPLE_IP
|
||||||
|
| PERF_SAMPLE_TID
|
||||||
| PERF_SAMPLE_CALLCHAIN
|
| PERF_SAMPLE_CALLCHAIN
|
||||||
| PERF_SAMPLE_TIME;
|
| PERF_SAMPLE_TIME;
|
||||||
attr.wakeup_events = N_WAKEUP_EVENTS;
|
attr.wakeup_events = N_WAKEUP_EVENTS;
|
||||||
|
|||||||
Reference in New Issue
Block a user