[sysprof] perf-source: we need PERF_SAMPLE_TID
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] perf-source: we need PERF_SAMPLE_TID
- Date: Fri, 15 Apr 2016 12:05:19 +0000 (UTC)
commit 18d2d81824f744b671a9608e74994367d438daea
Author: Christian Hergert <chergert redhat com>
Date: Fri Apr 15 05:04:29 2016 -0700
perf-source: we need PERF_SAMPLE_TID
I mistakingly removed this, which caused us to not get sample delivery.
lib/sp-perf-source.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lib/sp-perf-source.c b/lib/sp-perf-source.c
index 5406fbe..3b60381 100644
--- a/lib/sp-perf-source.c
+++ b/lib/sp-perf-source.c
@@ -189,6 +189,7 @@ sp_perf_source_handle_event (SpPerfCounterEvent *event,
case PERF_RECORD_COMM:
offset = strlen (event->comm.comm) + 1;
realign (&offset, sizeof (guint64));
+ offset += sizeof (GPid) + sizeof (GPid);
memcpy (&time, event->comm.comm + offset, sizeof time);
sp_capture_writer_add_process (self->writer,
@@ -239,6 +240,7 @@ sp_perf_source_handle_event (SpPerfCounterEvent *event,
case PERF_RECORD_MMAP:
offset = strlen (event->mmap.filename) + 1;
realign (&offset, sizeof (guint64));
+ offset += sizeof (GPid) + sizeof (GPid);
memcpy (&time, event->mmap.filename + offset, sizeof time);
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));
attr.sample_type = PERF_SAMPLE_IP
+ | PERF_SAMPLE_TID
| PERF_SAMPLE_CALLCHAIN
| PERF_SAMPLE_TIME;
attr.wakeup_events = N_WAKEUP_EVENTS;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]