diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-07-30 10:02:25 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-07-30 10:02:25 +0200 |
commit | 7f06d0aa530cc61cb5e048d4eb34921dee12058a (patch) | |
tree | 575a3fce988575a37272cdd22d82ad7c174bc947 /tools/perf/builtin-script.c | |
parent | b3c303be4c35856945cb17ec639b94637447dae2 (diff) | |
parent | 123a039d0d54de6d5bafd551e7aa17569e13e315 (diff) |
Merge tag 'perf-core-for-mingo-5.4-20190729' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
perf trace:
Arnaldo Carvalho de Melo:
- Use BPF_MAP_TYPE_PROG_ARRAY + bpf_tail_call() for augmenting raw syscalls,
i.e. copy pointers passed to/from userspace. The use of a table per syscall
to tell the BPF program what to copy made the raw_syscalls:sys_enter/exit
programs a bit complex, the scratch space would have to be bigger to allow
for checking all args to see which ones were a pathname, so use a PROG_ARRAY
map instead, test it with syscalls that receive multiple pathnames at
different registers (rename, renameat, etc).
- Beautify various syscalls using this new infrastructure, and also add code
that looks for syscalls with BPF augmenters, such as "open", and then reuse
it with syscalls not yet having a specific augmenter, but that copies the
same argument with the same type, say "statfs" can initially reuse "open",
beautifier, as both have as its first arg a "const char *".
- Do not using fd->pathname beautifier when the 'close' syscall isn't enabled,
as we can't invalidate that mapping.
core:
Jiri Olsa:
- Introduce tools/perf/lib/, that eventually will move to tools/lib/perf/, to
allow other tools to use the abstractions and code perf uses to set up
the perf ring buffer and set up the many possible combinations in allowed
by the kernel, starting with 'struct perf_evsel' and 'struct perf_evlist'.
perf vendor events:
Michael Petlan:
- Add missing event description to power9 event definitions.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 167 |
1 files changed, 84 insertions, 83 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 0140ddb8dd0b..31a529ec139f 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -48,6 +48,7 @@ #include <fcntl.h> #include <unistd.h> #include <subcmd/pager.h> +#include <perf/evlist.h> #include <linux/ctype.h> @@ -242,7 +243,7 @@ static struct { }, }; -struct perf_evsel_script { +struct evsel_script { char *filename; FILE *fp; u64 samples; @@ -251,15 +252,15 @@ struct perf_evsel_script { int gnum; }; -static inline struct perf_evsel_script *evsel_script(struct perf_evsel *evsel) +static inline struct evsel_script *evsel_script(struct evsel *evsel) { - return (struct perf_evsel_script *)evsel->priv; + return (struct evsel_script *)evsel->priv; } -static struct perf_evsel_script *perf_evsel_script__new(struct perf_evsel *evsel, +static struct evsel_script *perf_evsel_script__new(struct evsel *evsel, struct perf_data *data) { - struct perf_evsel_script *es = zalloc(sizeof(*es)); + struct evsel_script *es = zalloc(sizeof(*es)); if (es != NULL) { if (asprintf(&es->filename, "%s.%s.dump", data->file.path, perf_evsel__name(evsel)) < 0) @@ -277,7 +278,7 @@ out_free: return NULL; } -static void perf_evsel_script__delete(struct perf_evsel_script *es) +static void perf_evsel_script__delete(struct evsel_script *es) { zfree(&es->filename); fclose(es->fp); @@ -285,7 +286,7 @@ static void perf_evsel_script__delete(struct perf_evsel_script *es) free(es); } -static int perf_evsel_script__fprintf(struct perf_evsel_script *es, FILE *fp) +static int perf_evsel_script__fprintf(struct evsel_script *es, FILE *fp) { struct stat st; @@ -340,12 +341,12 @@ static const char *output_field2str(enum perf_output_field field) #define PRINT_FIELD(x) (output[output_type(attr->type)].fields & PERF_OUTPUT_##x) -static int perf_evsel__do_check_stype(struct perf_evsel *evsel, +static int perf_evsel__do_check_stype(struct evsel *evsel, u64 sample_type, const char *sample_msg, enum perf_output_field field, bool allow_user_set) { - struct perf_event_attr *attr = &evsel->attr; + struct perf_event_attr *attr = &evsel->core.attr; int type = output_type(attr->type); const char *evname; @@ -372,7 +373,7 @@ static int perf_evsel__do_check_stype(struct perf_evsel *evsel, return 0; } -static int perf_evsel__check_stype(struct perf_evsel *evsel, +static int perf_evsel__check_stype(struct evsel *evsel, u64 sample_type, const char *sample_msg, enum perf_output_field field) { @@ -380,10 +381,10 @@ static int perf_evsel__check_stype(struct perf_evsel *evsel, false); } -static int perf_evsel__check_attr(struct perf_evsel *evsel, +static int perf_evsel__check_attr(struct evsel *evsel, struct perf_session *session) { - struct perf_event_attr *attr = &evsel->attr; + struct perf_event_attr *attr = &evsel->core.attr; bool allow_user_set; if (perf_header__has_feat(&session->header, HEADER_STAT)) @@ -418,7 +419,7 @@ static int perf_evsel__check_attr(struct perf_evsel *evsel, return -EINVAL; if (PRINT_FIELD(SYM) && - !(evsel->attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) { + !(evsel->core.attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) { pr_err("Display of symbols requested but neither sample IP nor " "sample address\navailable. Hence, no addresses to convert " "to symbols.\n"); @@ -430,7 +431,7 @@ static int perf_evsel__check_attr(struct perf_evsel *evsel, return -EINVAL; } if (PRINT_FIELD(DSO) && - !(evsel->attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) { + !(evsel->core.attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) { pr_err("Display of DSO requested but no address to convert.\n"); return -EINVAL; } @@ -507,7 +508,7 @@ static void set_print_ip_opts(struct perf_event_attr *attr) static int perf_session__check_output_opt(struct perf_session *session) { unsigned int j; - struct perf_evsel *evsel; + struct evsel *evsel; for (j = 0; j < OUTPUT_TYPE_MAX; ++j) { evsel = perf_session__find_first_evtype(session, attr_type(j)); @@ -531,7 +532,7 @@ static int perf_session__check_output_opt(struct perf_session *session) if (evsel == NULL) continue; - set_print_ip_opts(&evsel->attr); + set_print_ip_opts(&evsel->core.attr); } if (!no_callchain) { @@ -558,7 +559,7 @@ static int perf_session__check_output_opt(struct perf_session *session) j = PERF_TYPE_TRACEPOINT; evlist__for_each_entry(session->evlist, evsel) { - if (evsel->attr.type != j) + if (evsel->core.attr.type != j) continue; if (evsel__has_callchain(evsel)) { @@ -566,7 +567,7 @@ static int perf_session__check_output_opt(struct perf_session *session) output[j].fields |= PERF_OUTPUT_SYM; output[j].fields |= PERF_OUTPUT_SYMOFFSET; output[j].fields |= PERF_OUTPUT_DSO; - set_print_ip_opts(&evsel->attr); + set_print_ip_opts(&evsel->core.attr); goto out; } } @@ -614,10 +615,10 @@ static int perf_sample__fprintf_uregs(struct perf_sample *sample, static int perf_sample__fprintf_start(struct perf_sample *sample, struct thread *thread, - struct perf_evsel *evsel, + struct evsel *evsel, u32 type, FILE *fp) { - struct perf_event_attr *attr = &evsel->attr; + struct perf_event_attr *attr = &evsel->core.attr; unsigned long secs; unsigned long long nsecs; int printed = 0; @@ -1162,13 +1163,13 @@ out: } static const char *resolve_branch_sym(struct perf_sample *sample, - struct perf_evsel *evsel, + struct evsel *evsel, struct thread *thread, struct addr_location *al, u64 *ip) { struct addr_location addr_al; - struct perf_event_attr *attr = &evsel->attr; + struct perf_event_attr *attr = &evsel->core.attr; const char *name = NULL; if (sample->flags & (PERF_IP_FLAG_CALL | PERF_IP_FLAG_TRACE_BEGIN)) { @@ -1191,11 +1192,11 @@ static const char *resolve_branch_sym(struct perf_sample *sample, } static int perf_sample__fprintf_callindent(struct perf_sample *sample, - struct perf_evsel *evsel, + struct evsel *evsel, struct thread *thread, struct addr_location *al, FILE *fp) { - struct perf_event_attr *attr = &evsel->attr; + struct perf_event_attr *attr = &evsel->core.attr; size_t depth = thread_stack__depth(thread, sample->cpu); const char *name = NULL; static int spacing; @@ -1285,12 +1286,12 @@ static int perf_sample__fprintf_ipc(struct perf_sample *sample, } static int perf_sample__fprintf_bts(struct perf_sample *sample, - struct perf_evsel *evsel, + struct evsel *evsel, struct thread *thread, struct addr_location *al, struct machine *machine, FILE *fp) { - struct perf_event_attr *attr = &evsel->attr; + struct perf_event_attr *attr = &evsel->core.attr; unsigned int type = output_type(attr->type); bool print_srcline_last = false; int printed = 0; @@ -1322,7 +1323,7 @@ static int perf_sample__fprintf_bts(struct perf_sample *sample, /* print branch_to information */ if (PRINT_FIELD(ADDR) || - ((evsel->attr.sample_type & PERF_SAMPLE_ADDR) && + ((evsel->core.attr.sample_type & PERF_SAMPLE_ADDR) && !output[type].user_set)) { printed += fprintf(fp, " => "); printed += perf_sample__fprintf_addr(sample, thread, attr, fp); @@ -1593,9 +1594,9 @@ static int perf_sample__fprintf_synth_cbr(struct perf_sample *sample, FILE *fp) } static int perf_sample__fprintf_synth(struct perf_sample *sample, - struct perf_evsel *evsel, FILE *fp) + struct evsel *evsel, FILE *fp) { - switch (evsel->attr.config) { + switch (evsel->core.attr.config) { case PERF_SYNTH_INTEL_PTWRITE: return perf_sample__fprintf_synth_ptwrite(sample, fp); case PERF_SYNTH_INTEL_MWAIT: @@ -1627,8 +1628,8 @@ struct perf_script { bool show_bpf_events; bool allocated; bool per_event_dump; - struct cpu_map *cpus; - struct thread_map *threads; + struct perf_cpu_map *cpus; + struct perf_thread_map *threads; int name_width; const char *time_str; struct perf_time_interval *ptime_range; @@ -1636,9 +1637,9 @@ struct perf_script { int range_num; }; -static int perf_evlist__max_name_len(struct perf_evlist *evlist) +static int perf_evlist__max_name_len(struct evlist *evlist) { - struct perf_evsel *evsel; + struct evsel *evsel; int max = 0; evlist__for_each_entry(evlist, evsel) { @@ -1670,7 +1671,7 @@ static int data_src__fprintf(u64 data_src, FILE *fp) struct metric_ctx { struct perf_sample *sample; struct thread *thread; - struct perf_evsel *evsel; + struct evsel *evsel; FILE *fp; }; @@ -1705,7 +1706,7 @@ static void script_new_line(struct perf_stat_config *config __maybe_unused, static void perf_sample__fprint_metric(struct perf_script *script, struct thread *thread, - struct perf_evsel *evsel, + struct evsel *evsel, struct perf_sample *sample, FILE *fp) { @@ -1720,7 +1721,7 @@ static void perf_sample__fprint_metric(struct perf_script *script, }, .force_header = false, }; - struct perf_evsel *ev2; + struct evsel *ev2; u64 val; if (!evsel->stats) @@ -1733,7 +1734,7 @@ static void perf_sample__fprint_metric(struct perf_script *script, sample->cpu, &rt_stat); evsel_script(evsel)->val = val; - if (evsel_script(evsel->leader)->gnum == evsel->leader->nr_members) { + if (evsel_script(evsel->leader)->gnum == evsel->leader->core.nr_members) { for_each_group_member (ev2, evsel->leader) { perf_stat__print_shadow_stats(&stat_config, ev2, evsel_script(ev2)->val, @@ -1747,7 +1748,7 @@ static void perf_sample__fprint_metric(struct perf_script *script, } static bool show_event(struct perf_sample *sample, - struct perf_evsel *evsel, + struct evsel *evsel, struct thread *thread, struct addr_location *al) { @@ -1788,14 +1789,14 @@ static bool show_event(struct perf_sample *sample, } static void process_event(struct perf_script *script, - struct perf_sample *sample, struct perf_evsel *evsel, + struct perf_sample *sample, struct evsel *evsel, struct addr_location *al, struct machine *machine) { struct thread *thread = al->thread; - struct perf_event_attr *attr = &evsel->attr; + struct perf_event_attr *attr = &evsel->core.attr; unsigned int type = output_type(attr->type); - struct perf_evsel_script *es = evsel->priv; + struct evsel_script *es = evsel->priv; FILE *fp = es->fp; if (output[type].fields == 0) @@ -1897,9 +1898,9 @@ static void process_event(struct perf_script *script, static struct scripting_ops *scripting_ops; -static void __process_stat(struct perf_evsel *counter, u64 tstamp) +static void __process_stat(struct evsel *counter, u64 tstamp) { - int nthreads = thread_map__nr(counter->threads); + int nthreads = thread_map__nr(counter->core.threads); int ncpus = perf_evsel__nr_cpus(counter); int cpu, thread; static int header_printed; @@ -1920,8 +1921,8 @@ static void __process_stat(struct perf_evsel *counter, u64 tstamp) counts = perf_counts(counter->counts, cpu, thread); printf("%3d %8d %15" PRIu64 " %15" PRIu64 " %15" PRIu64 " %15" PRIu64 " %s\n", - counter->cpus->map[cpu], - thread_map__pid(counter->threads, thread), + counter->core.cpus->map[cpu], + thread_map__pid(counter->core.threads, thread), counts->val, counts->ena, counts->run, @@ -1931,7 +1932,7 @@ static void __process_stat(struct perf_evsel *counter, u64 tstamp) } } -static void process_stat(struct perf_evsel *counter, u64 tstamp) +static void process_stat(struct evsel *counter, u64 tstamp) { if (scripting_ops && scripting_ops->process_stat) scripting_ops->process_stat(&stat_config, counter, tstamp); @@ -1973,7 +1974,7 @@ static bool filter_cpu(struct perf_sample *sample) static int process_sample_event(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, - struct perf_evsel *evsel, + struct evsel *evsel, struct machine *machine) { struct perf_script *scr = container_of(tool, struct perf_script, tool); @@ -2018,13 +2019,13 @@ out_put: } static int process_attr(struct perf_tool *tool, union perf_event *event, - struct perf_evlist **pevlist) + struct evlist **pevlist) { struct perf_script *scr = container_of(tool, struct perf_script, tool); - struct perf_evlist *evlist; - struct perf_evsel *evsel, *pos; + struct evlist *evlist; + struct evsel *evsel, *pos; int err; - static struct perf_evsel_script *es; + static struct evsel_script *es; err = perf_event__process_attr(tool, event, pevlist); if (err) @@ -2046,18 +2047,18 @@ static int process_attr(struct perf_tool *tool, union perf_event *event, } } - if (evsel->attr.type >= PERF_TYPE_MAX && - evsel->attr.type != PERF_TYPE_SYNTH) + if (evsel->core.attr.type >= PERF_TYPE_MAX && + evsel->core.attr.type != PERF_TYPE_SYNTH) return 0; evlist__for_each_entry(evlist, pos) { - if (pos->attr.type == evsel->attr.type && pos != evsel) + if (pos->core.attr.type == evsel->core.attr.type && pos != evsel) return 0; } - set_print_ip_opts(&evsel->attr); + set_print_ip_opts(&evsel->core.attr); - if (evsel->attr.sample_type) + if (evsel->core.attr.sample_type) err = perf_evsel__check_attr(evsel, scr->session); return err; @@ -2071,7 +2072,7 @@ static int process_comm_event(struct perf_tool *tool, struct thread *thread; struct perf_script *script = container_of(tool, struct perf_script, tool); struct perf_session *session = script->session; - struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); int ret = -1; thread = machine__findnew_thread(machine, event->comm.pid, event->comm.tid); @@ -2083,7 +2084,7 @@ static int process_comm_event(struct perf_tool *tool, if (perf_event__process_comm(tool, event, sample, machine) < 0) goto out; - if (!evsel->attr.sample_id_all) { + if (!evsel->core.attr.sample_id_all) { sample->cpu = 0; sample->time = 0; sample->tid = event->comm.tid; @@ -2108,7 +2109,7 @@ static int process_namespaces_event(struct perf_tool *tool, struct thread *thread; struct perf_script *script = container_of(tool, struct perf_script, tool); struct perf_session *session = script->session; - struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); int ret = -1; thread = machine__findnew_thread(machine, event->namespaces.pid, @@ -2121,7 +2122,7 @@ static int process_namespaces_event(struct perf_tool *tool, if (perf_event__process_namespaces(tool, event, sample, machine) < 0) goto out; - if (!evsel->attr.sample_id_all) { + if (!evsel->core.attr.sample_id_all) { sample->cpu = 0; sample->time = 0; sample->tid = event->namespaces.tid; @@ -2146,7 +2147,7 @@ static int process_fork_event(struct perf_tool *tool, struct thread *thread; struct perf_script *script = container_of(tool, struct perf_script, tool); struct perf_session *session = script->session; - struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); if (perf_event__process_fork(tool, event, sample, machine) < 0) return -1; @@ -2157,7 +2158,7 @@ static int process_fork_event(struct perf_tool *tool, return -1; } - if (!evsel->attr.sample_id_all) { + if (!evsel->core.attr.sample_id_all) { sample->cpu = 0; sample->time = event->fork.time; sample->tid = event->fork.tid; @@ -2181,7 +2182,7 @@ static int process_exit_event(struct perf_tool *tool, struct thread *thread; struct perf_script *script = container_of(tool, struct perf_script, tool); struct perf_session *session = script->session; - struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); thread = machine__findnew_thread(machine, event->fork.pid, event->fork.tid); if (thread == NULL) { @@ -2189,7 +2190,7 @@ static int process_exit_event(struct perf_tool *tool, return -1; } - if (!evsel->attr.sample_id_all) { + if (!evsel->core.attr.sample_id_all) { sample->cpu = 0; sample->time = 0; sample->tid = event->fork.tid; @@ -2216,7 +2217,7 @@ static int process_mmap_event(struct perf_tool *tool, struct thread *thread; struct perf_script *script = container_of(tool, struct perf_script, tool); struct perf_session *session = script->session; - struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); if (perf_event__process_mmap(tool, event, sample, machine) < 0) return -1; @@ -2227,7 +2228,7 @@ static int process_mmap_event(struct perf_tool *tool, return -1; } - if (!evsel->attr.sample_id_all) { + if (!evsel->core.attr.sample_id_all) { sample->cpu = 0; sample->time = 0; sample->tid = event->mmap.tid; @@ -2250,7 +2251,7 @@ static int process_mmap2_event(struct perf_tool *tool, struct thread *thread; struct perf_script *script = container_of(tool, struct perf_script, tool); struct perf_session *session = script->session; - struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); if (perf_event__process_mmap2(tool, event, sample, machine) < 0) return -1; @@ -2261,7 +2262,7 @@ static int process_mmap2_event(struct perf_tool *tool, return -1; } - if (!evsel->attr.sample_id_all) { + if (!evsel->core.attr.sample_id_all) { sample->cpu = 0; sample->time = 0; sample->tid = event->mmap2.tid; @@ -2284,7 +2285,7 @@ static int process_switch_event(struct perf_tool *tool, struct thread *thread; struct perf_script *script = container_of(tool, struct perf_script, tool); struct perf_session *session = script->session; - struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); if (perf_event__process_switch(tool, event, sample, machine) < 0) return -1; @@ -2319,7 +2320,7 @@ process_lost_event(struct perf_tool *tool, { struct perf_script *script = container_of(tool, struct perf_script, tool); struct perf_session *session = script->session; - struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); struct thread *thread; thread = machine__findnew_thread(machine, sample->pid, @@ -2355,12 +2356,12 @@ process_bpf_events(struct perf_tool *tool __maybe_unused, struct thread *thread; struct perf_script *script = container_of(tool, struct perf_script, tool); struct perf_session *session = script->session; - struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); + struct evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id); if (machine__process_ksymbol(machine, event, sample) < 0) return -1; - if (!evsel->attr.sample_id_all) { + if (!evsel->core.attr.sample_id_all) { perf_event__fprintf(event, stdout); return 0; } @@ -2388,8 +2389,8 @@ static void sig_handler(int sig __maybe_unused) static void perf_script__fclose_per_event_dump(struct perf_script *script) { - struct perf_evlist *evlist = script->session->evlist; - struct perf_evsel *evsel; + struct evlist *evlist = script->session->evlist; + struct evsel *evsel; evlist__for_each_entry(evlist, evsel) { if (!evsel->priv) @@ -2401,7 +2402,7 @@ static void perf_script__fclose_per_event_dump(struct perf_script *script) static int perf_script__fopen_per_event_dump(struct perf_script *script) { - struct perf_evsel *evsel; + struct evsel *evsel; evlist__for_each_entry(script->session->evlist, evsel) { /* @@ -2428,8 +2429,8 @@ out_err_fclose: static int perf_script__setup_per_event_dump(struct perf_script *script) { - struct perf_evsel *evsel; - static struct perf_evsel_script es_stdout; + struct evsel *evsel; + static struct evsel_script es_stdout; if (script->per_event_dump) return perf_script__fopen_per_event_dump(script); @@ -2444,10 +2445,10 @@ static int perf_script__setup_per_event_dump(struct perf_script *script) static void perf_script__exit_per_event_dump_stats(struct perf_script *script) { - struct perf_evsel *evsel; + struct evsel *evsel; evlist__for_each_entry(script->session->evlist, evsel) { - struct perf_evsel_script *es = evsel->priv; + struct evsel_script *es = evsel->priv; perf_evsel_script__fprintf(es, stdout); perf_evsel_script__delete(es); @@ -3003,7 +3004,7 @@ static int check_ev_match(char *dir_name, char *scriptname, { char filename[MAXPATHLEN], evname[128]; char line[BUFSIZ], *p; - struct perf_evsel *pos; + struct evsel *pos; int match, len; FILE *fp; @@ -3236,7 +3237,7 @@ static int process_stat_round_event(struct perf_session *session, union perf_event *event) { struct stat_round_event *round = &event->stat_round; - struct perf_evsel *counter; + struct evsel *counter; evlist__for_each_entry(session->evlist, counter) { perf_stat_process_counter(&stat_config, counter); @@ -3256,7 +3257,7 @@ static int process_stat_config_event(struct perf_session *session __maybe_unused static int set_maps(struct perf_script *script) { - struct perf_evlist *evlist = script->session->evlist; + struct evlist *evlist = script->session->evlist; if (!script->cpus || !script->threads) return 0; @@ -3264,7 +3265,7 @@ static int set_maps(struct perf_script *script) if (WARN_ONCE(script->allocated, "stats double allocation\n")) return -EINVAL; - perf_evlist__set_maps(evlist, script->cpus, script->threads); + perf_evlist__set_maps(&evlist->core, script->cpus, script->threads); if (perf_evlist__alloc_stats(evlist, true)) return -ENOMEM; |