aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-09-03 10:34:29 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-25 09:51:48 -0300
commit70c20369ee95ef8b6887944194cfb74a5a8d1fe3 (patch)
treee25bde2c86f36e6375d234e97e62050daca95b0a /tools/perf/util/session.c
parentlibperf: Move 'heads' from 'struct evlist' to 'struct perf_evlist' (diff)
downloadlinux-dev-70c20369ee95ef8b6887944194cfb74a5a8d1fe3.tar.xz
linux-dev-70c20369ee95ef8b6887944194cfb74a5a8d1fe3.zip
libperf: Add perf_evsel__alloc_id/perf_evsel__free_id functions
Add perf_evsel__alloc_id()/perf_evsel__free_id() functions to libperf as internal functions. Move 'struct perf_sample_id' to internal/evsel.h header and change 'struct perf_sample_id::evsel' to 'struct perf_evsel' and the related code that touches it. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lore.kernel.org/lkml/20190913132355.21634-28-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index a621c73bad42..84a30ff3968a 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1324,6 +1324,7 @@ static int deliver_sample_value(struct evlist *evlist,
struct machine *machine)
{
struct perf_sample_id *sid = perf_evlist__id2sid(evlist, v->id);
+ struct evsel *evsel;
if (sid) {
sample->id = v->id;
@@ -1343,7 +1344,8 @@ static int deliver_sample_value(struct evlist *evlist,
if (!sample->period)
return 0;
- return tool->sample(tool, event, sample, sid->evsel, machine);
+ evsel = container_of(sid->evsel, struct evsel, core);
+ return tool->sample(tool, event, sample, evsel, machine);
}
static int deliver_sample_group(struct evlist *evlist,