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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
8cd36f3ef4
commit
deaf321913
@@ -530,7 +530,7 @@ static int write_event_desc(struct feat_fd *ff,
|
||||
/*
|
||||
* write unique ids for this event
|
||||
*/
|
||||
ret = do_write(ff, evsel->id, evsel->ids * sizeof(u64));
|
||||
ret = do_write(ff, evsel->core.id, evsel->ids * sizeof(u64));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
@@ -1590,7 +1590,7 @@ static void free_event_desc(struct evsel *events)
|
||||
|
||||
for (evsel = events; evsel->core.attr.size; evsel++) {
|
||||
zfree(&evsel->name);
|
||||
zfree(&evsel->id);
|
||||
zfree(&evsel->core.id);
|
||||
}
|
||||
|
||||
free(events);
|
||||
@@ -1657,7 +1657,7 @@ static struct evsel *read_event_desc(struct feat_fd *ff)
|
||||
if (!id)
|
||||
goto error;
|
||||
evsel->ids = nr;
|
||||
evsel->id = id;
|
||||
evsel->core.id = id;
|
||||
|
||||
for (j = 0 ; j < nr; j++) {
|
||||
if (do_read_u64(ff, id))
|
||||
@@ -1701,7 +1701,7 @@ static void print_event_desc(struct feat_fd *ff, FILE *fp)
|
||||
|
||||
if (evsel->ids) {
|
||||
fprintf(fp, ", id = {");
|
||||
for (j = 0, id = evsel->id; j < evsel->ids; j++, id++) {
|
||||
for (j = 0, id = evsel->core.id; j < evsel->ids; j++, id++) {
|
||||
if (j)
|
||||
fputc(',', fp);
|
||||
fprintf(fp, " %"PRIu64, *id);
|
||||
@@ -3068,7 +3068,7 @@ int perf_session__write_header(struct perf_session *session,
|
||||
|
||||
evlist__for_each_entry(session->evlist, evsel) {
|
||||
evsel->id_offset = lseek(fd, 0, SEEK_CUR);
|
||||
err = do_write(&ff, evsel->id, evsel->ids * sizeof(u64));
|
||||
err = do_write(&ff, evsel->core.id, evsel->ids * sizeof(u64));
|
||||
if (err < 0) {
|
||||
pr_debug("failed to write perf header\n");
|
||||
return err;
|
||||
|
Reference in New Issue
Block a user