aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-09-02 22:12:26 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-25 09:51:47 -0300
commitdeaf321913a7b1d440c5cd5c7766d47381c9b21b (patch)
tree7c9679f285bb696c36445ab7a34dfea84c52a69d /tools/perf/util/evsel.c
parentlibperf: Move 'sample_id' from 'struct evsel' to 'struct perf_evsel' (diff)
downloadlinux-dev-deaf321913a7b1d440c5cd5c7766d47381c9b21b.tar.xz
linux-dev-deaf321913a7b1d440c5cd5c7766d47381c9b21b.zip
libperf: Move 'id' from 'struct evsel' to 'struct perf_evsel'
Move the 'id' array from 'struct evsel' to libperf's 'struct perf_evsel'. Committer note: Fix the tools/perf/util/cs-etm.c build, i.e. aarch64's CoreSight. 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-25-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r--tools/perf/util/evsel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index cb1ada8cf4a4..9c1b4f4a5fa3 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1239,8 +1239,8 @@ int perf_evsel__alloc_id(struct evsel *evsel, int ncpus, int nthreads)
if (evsel->core.sample_id == NULL)
return -ENOMEM;
- evsel->id = zalloc(ncpus * nthreads * sizeof(u64));
- if (evsel->id == NULL) {
+ evsel->core.id = zalloc(ncpus * nthreads * sizeof(u64));
+ if (evsel->core.id == NULL) {
xyarray__delete(evsel->core.sample_id);
evsel->core.sample_id = NULL;
return -ENOMEM;
@@ -1253,7 +1253,7 @@ static void perf_evsel__free_id(struct evsel *evsel)
{
xyarray__delete(evsel->core.sample_id);
evsel->core.sample_id = NULL;
- zfree(&evsel->id);
+ zfree(&evsel->core.id);
evsel->ids = 0;
}