[sysprof] sources/perf: Include the sample identifier in PERF_RECORD_SAMPLE.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] sources/perf: Include the sample identifier in PERF_RECORD_SAMPLE.
- Date: Wed, 16 May 2018 09:55:55 +0000 (UTC)
commit 925dadce826719e1ad1b7c3cde4c04f76872a617
Author: Eric Anholt <eric anholt net>
Date: Wed May 16 09:37:41 2018 +0100
sources/perf: Include the sample identifier in PERF_RECORD_SAMPLE.
If we want to start watching other perf events, we need a way to look
up what perf event we got when a PERF_RECORD_SAMPLE comes in. The
sample identifier is what does that.
lib/sources/sp-perf-counter.h | 1 +
lib/sources/sp-perf-source.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/lib/sources/sp-perf-counter.h b/lib/sources/sp-perf-counter.h
index 213aff3..a473b3d 100644
--- a/lib/sources/sp-perf-counter.h
+++ b/lib/sources/sp-perf-counter.h
@@ -81,6 +81,7 @@ typedef struct
typedef struct
{
struct perf_event_header header;
+ guint64 identifier;
guint64 ip;
guint32 pid;
guint32 tid;
diff --git a/lib/sources/sp-perf-source.c b/lib/sources/sp-perf-source.c
index a7da6cc..b762c24 100644
--- a/lib/sources/sp-perf-source.c
+++ b/lib/sources/sp-perf-source.c
@@ -291,6 +291,7 @@ sp_perf_source_start_pid (SpPerfSource *self,
attr.sample_type = PERF_SAMPLE_IP
| PERF_SAMPLE_TID
+ | PERF_SAMPLE_IDENTIFIER
| 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]