summaryrefslogtreecommitdiff
path: root/tools/perf/util/evlist.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-08-02 18:42:57 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-08-02 18:42:57 +0400
commitcb0b29e0861659c9eef9664772cd7e845ba1104a (patch)
treea53dd1ebccef16cb9e7873aa76566ab339fb73ff /tools/perf/util/evlist.c
parent7b56cce27123ccbf2cb82febbbc88443d719f1f8 (diff)
downloadlinux-cb0b29e0861659c9eef9664772cd7e845ba1104a.tar.xz
perf evlist: Introduce perf_evlist__parse_sample
That is a more compact form of perf_session__parse_sample and to support multiple evlists per perf_session is the way to go anyway. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-vkxx3j5qktoj11bvcwmfjj13@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r--tools/perf/util/evlist.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 3edfd3483816..1a560e0904a5 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -881,3 +881,12 @@ int perf_evlist__start_workload(struct perf_evlist *evlist)
return 0;
}
+
+int perf_evlist__parse_sample(struct perf_evlist *evlist,
+ const union perf_event *event,
+ struct perf_sample *sample, bool swapped)
+{
+ struct perf_evsel *e = list_entry(evlist->entries.next, struct perf_evsel, node);
+ return perf_event__parse_sample(event, e->attr.sample_type, e->sample_size,
+ e->attr.sample_id_all, sample, swapped);
+}