Skip to contentSkip to conversation

perf evsel: Add PERF_SAMPLE_READ sample related processing

tip:perf/core tip-bot for Jiri Olsa 1 participant 1 message Aug 12, 2013 perf events

lore
Share & tools
lore

tip-bot for Jiri Olsa

author merge bot
#0 lore raw
Commit-ID:  e4caec0d1af3d608d52e6b92d09fb862d7691d4b
Gitweb:     http://git.kernel.org/tip/e4caec0d1af3d608d52e6b92d09fb862d7691d4b
Author:     Jiri Olsa <[email protected]>
AuthorDate: Wed, 10 Oct 2012 18:52:24 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 7 Aug 2013 17:35:22 -0300

perf evsel: Add PERF_SAMPLE_READ sample related processing

For sample with sample type PERF_SAMPLE_READ the period value is stored in the 'struct sample_read'.

Moreover if the read format has PERF_FORMAT_GROUP, the 'struct sample_read' contains period values for all events in the group (for which the sample's event is a leader).

We deliver separated samples for all the values contained within the 'struct sample_read'.

---
 tools/perf/util/evsel.h   |  3 ++
 tools/perf/util/session.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 74 insertions(+), 1 deletion(-)
tools/perf/util/evsel.h +3 -0
index 3f156cc..6a2cf26 100644
@@ -38,6 +38,9 @@ struct perf_sample_id {
 	struct hlist_node 	node;
 	u64		 	id;
 	struct perf_evsel	*evsel;
+
+	/* Holds total ID period value for PERF_SAMPLE_READ processing. */
+	u64			period;
 };
 
 /** struct perf_evsel - event selector
tools/perf/util/session.c +71 -1

84 lines not on this page · raw message