perf evlist: Rename struct perf_evlist to struct evlist

Rename struct perf_evlist to struct evlist, so we don't have a name
clash when we add struct perf_evlist in libperf.

Committer notes:

Added fixes to build on arm64, from Jiri and from me
(tools/perf/util/cs-etm.c)

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190721112506.12306-6-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jiri Olsa
2019-07-29 18:34:42 -03:00
committed by Arnaldo Carvalho de Melo
parent 32dcd021d0
commit 63503dba87
86 changed files with 571 additions and 571 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ static struct perf_pmu **find_all_arm_spe_pmus(int *nr_spes, int *err)
}
struct auxtrace_record
*auxtrace_record__init(struct perf_evlist *evlist, int *err)
*auxtrace_record__init(struct evlist *evlist, int *err)
{
struct perf_pmu *cs_etm_pmu;
struct evsel *evsel;
+4 -4
View File
@@ -32,7 +32,7 @@
struct cs_etm_recording {
struct auxtrace_record itr;
struct perf_pmu *cs_etm_pmu;
struct perf_evlist *evlist;
struct evlist *evlist;
int wrapped_cnt;
bool *wrapped;
bool snapshot_mode;
@@ -245,7 +245,7 @@ static int cs_etm_set_sink_attr(struct perf_pmu *pmu,
}
static int cs_etm_recording_options(struct auxtrace_record *itr,
struct perf_evlist *evlist,
struct evlist *evlist,
struct record_opts *opts)
{
int ret;
@@ -434,7 +434,7 @@ static u64 cs_etm_get_config(struct auxtrace_record *itr)
struct cs_etm_recording *ptr =
container_of(itr, struct cs_etm_recording, itr);
struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
struct perf_evlist *evlist = ptr->evlist;
struct evlist *evlist = ptr->evlist;
struct evsel *evsel;
evlist__for_each_entry(evlist, evsel) {
@@ -485,7 +485,7 @@ static u64 cs_etmv4_get_config(struct auxtrace_record *itr)
static size_t
cs_etm_info_priv_size(struct auxtrace_record *itr __maybe_unused,
struct perf_evlist *evlist __maybe_unused)
struct evlist *evlist __maybe_unused)
{
int i;
int etmv3 = 0, etmv4 = 0;
+3 -3
View File
@@ -27,12 +27,12 @@
struct arm_spe_recording {
struct auxtrace_record itr;
struct perf_pmu *arm_spe_pmu;
struct perf_evlist *evlist;
struct evlist *evlist;
};
static size_t
arm_spe_info_priv_size(struct auxtrace_record *itr __maybe_unused,
struct perf_evlist *evlist __maybe_unused)
struct evlist *evlist __maybe_unused)
{
return ARM_SPE_AUXTRACE_PRIV_SIZE;
}
@@ -59,7 +59,7 @@ static int arm_spe_info_fill(struct auxtrace_record *itr,
}
static int arm_spe_recording_options(struct auxtrace_record *itr,
struct perf_evlist *evlist,
struct evlist *evlist,
struct record_opts *opts)
{
struct arm_spe_recording *sper =
+3 -3
View File
@@ -106,7 +106,7 @@ const char * const kvm_skip_events[] = {
};
static int is_tracepoint_available(const char *str, struct perf_evlist *evlist)
static int is_tracepoint_available(const char *str, struct evlist *evlist)
{
struct parse_events_error err;
int ret;
@@ -119,7 +119,7 @@ static int is_tracepoint_available(const char *str, struct perf_evlist *evlist)
}
static int ppc__setup_book3s_hv(struct perf_kvm_stat *kvm,
struct perf_evlist *evlist)
struct evlist *evlist)
{
const char **events_ptr;
int i, nr_tp = 0, err = -1;
@@ -146,7 +146,7 @@ static int ppc__setup_book3s_hv(struct perf_kvm_stat *kvm,
/* Wrapper to setup kvm tracepoints */
static int ppc__setup_kvm_tp(struct perf_kvm_stat *kvm)
{
struct perf_evlist *evlist = perf_evlist__new();
struct evlist *evlist = perf_evlist__new();
if (evlist == NULL)
return -ENOMEM;
+3 -3
View File
@@ -20,7 +20,7 @@ static void cpumsf_free(struct auxtrace_record *itr)
}
static size_t cpumsf_info_priv_size(struct auxtrace_record *itr __maybe_unused,
struct perf_evlist *evlist __maybe_unused)
struct evlist *evlist __maybe_unused)
{
return 0;
}
@@ -43,7 +43,7 @@ cpumsf_reference(struct auxtrace_record *itr __maybe_unused)
static int
cpumsf_recording_options(struct auxtrace_record *ar __maybe_unused,
struct perf_evlist *evlist __maybe_unused,
struct evlist *evlist __maybe_unused,
struct record_opts *opts)
{
unsigned int factor = 1;
@@ -82,7 +82,7 @@ cpumsf_parse_snapshot_options(struct auxtrace_record *itr __maybe_unused,
* auxtrace_record__init is called when perf record
* check if the event really need auxtrace
*/
struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
int *err)
{
struct auxtrace_record *aux;
+1 -1
View File
@@ -40,7 +40,7 @@ static pid_t spawn(void)
*/
int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
{
struct perf_evlist *evlist = NULL;
struct evlist *evlist = NULL;
struct evsel *evsel = NULL;
struct perf_event_attr pe;
int i, fd[2], flag, ret;
+1 -1
View File
@@ -51,7 +51,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
};
struct perf_thread_map *threads = NULL;
struct perf_cpu_map *cpus = NULL;
struct perf_evlist *evlist = NULL;
struct evlist *evlist = NULL;
struct evsel *evsel = NULL;
int err = -1, ret, i;
const char *comm1, *comm2;
+2 -2
View File
@@ -16,7 +16,7 @@
#include "../../util/evlist.h"
static
struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
struct auxtrace_record *auxtrace_record__init_intel(struct evlist *evlist,
int *err)
{
struct perf_pmu *intel_pt_pmu;
@@ -50,7 +50,7 @@ struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
return NULL;
}
struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
struct auxtrace_record *auxtrace_record__init(struct evlist *evlist,
int *err)
{
char buffer[64];
+3 -3
View File
@@ -35,7 +35,7 @@ struct intel_bts_snapshot_ref {
struct intel_bts_recording {
struct auxtrace_record itr;
struct perf_pmu *intel_bts_pmu;
struct perf_evlist *evlist;
struct evlist *evlist;
bool snapshot_mode;
size_t snapshot_size;
int snapshot_ref_cnt;
@@ -50,7 +50,7 @@ struct branch {
static size_t
intel_bts_info_priv_size(struct auxtrace_record *itr __maybe_unused,
struct perf_evlist *evlist __maybe_unused)
struct evlist *evlist __maybe_unused)
{
return INTEL_BTS_AUXTRACE_PRIV_SIZE;
}
@@ -99,7 +99,7 @@ static int intel_bts_info_fill(struct auxtrace_record *itr,
}
static int intel_bts_recording_options(struct auxtrace_record *itr,
struct perf_evlist *evlist,
struct evlist *evlist,
struct record_opts *opts)
{
struct intel_bts_recording *btsr =
+7 -7
View File
@@ -44,7 +44,7 @@ struct intel_pt_recording {
struct auxtrace_record itr;
struct perf_pmu *intel_pt_pmu;
int have_sched_switch;
struct perf_evlist *evlist;
struct evlist *evlist;
bool snapshot_mode;
bool snapshot_init_done;
size_t snapshot_size;
@@ -110,7 +110,7 @@ static u64 intel_pt_masked_bits(u64 mask, u64 bits)
}
static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str,
struct perf_evlist *evlist, u64 *res)
struct evlist *evlist, u64 *res)
{
struct evsel *evsel;
u64 mask;
@@ -132,7 +132,7 @@ static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str,
}
static size_t intel_pt_psb_period(struct perf_pmu *intel_pt_pmu,
struct perf_evlist *evlist)
struct evlist *evlist)
{
u64 val;
int err, topa_multiple_entries;
@@ -268,7 +268,7 @@ intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu)
return attr;
}
static const char *intel_pt_find_filter(struct perf_evlist *evlist,
static const char *intel_pt_find_filter(struct evlist *evlist,
struct perf_pmu *intel_pt_pmu)
{
struct evsel *evsel;
@@ -289,7 +289,7 @@ static size_t intel_pt_filter_bytes(const char *filter)
}
static size_t
intel_pt_info_priv_size(struct auxtrace_record *itr, struct perf_evlist *evlist)
intel_pt_info_priv_size(struct auxtrace_record *itr, struct evlist *evlist)
{
struct intel_pt_recording *ptr =
container_of(itr, struct intel_pt_recording, itr);
@@ -398,7 +398,7 @@ static int intel_pt_info_fill(struct auxtrace_record *itr,
return 0;
}
static int intel_pt_track_switches(struct perf_evlist *evlist)
static int intel_pt_track_switches(struct evlist *evlist)
{
const char *sched_switch = "sched:sched_switch";
struct evsel *evsel;
@@ -549,7 +549,7 @@ static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu,
}
static int intel_pt_recording_options(struct auxtrace_record *itr,
struct perf_evlist *evlist,
struct evlist *evlist,
struct record_opts *opts)
{
struct intel_pt_recording *ptr =
+2 -2
View File
@@ -2236,7 +2236,7 @@ static void print_pareto(FILE *out)
static void print_c2c_info(FILE *out, struct perf_session *session)
{
struct perf_evlist *evlist = session->evlist;
struct evlist *evlist = session->evlist;
struct evsel *evsel;
bool first = true;
@@ -2567,7 +2567,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
return parse_callchain_report_opt(arg);
}
static int setup_callchain(struct perf_evlist *evlist)
static int setup_callchain(struct evlist *evlist)
{
u64 sample_type = perf_evlist__combined_sample_type(evlist);
enum perf_call_graph_mode mode = CALLCHAIN_NONE;
+4 -4
View File
@@ -449,7 +449,7 @@ static struct perf_diff pdiff = {
};
static struct evsel *evsel_match(struct evsel *evsel,
struct perf_evlist *evlist)
struct evlist *evlist)
{
struct evsel *e;
@@ -461,7 +461,7 @@ static struct evsel *evsel_match(struct evsel *evsel,
return NULL;
}
static void perf_evlist__collapse_resort(struct perf_evlist *evlist)
static void perf_evlist__collapse_resort(struct evlist *evlist)
{
struct evsel *evsel;
@@ -1009,7 +1009,7 @@ static void data__fprintf(void)
static void data_process(void)
{
struct perf_evlist *evlist_base = data__files[0].session->evlist;
struct evlist *evlist_base = data__files[0].session->evlist;
struct evsel *evsel_base;
bool first = true;
@@ -1019,7 +1019,7 @@ static void data_process(void)
int i;
data__for_each_file_new(i, d) {
struct perf_evlist *evlist = d->session->evlist;
struct evlist *evlist = d->session->evlist;
struct evsel *evsel;
struct hists *hists;
+1 -1
View File
@@ -27,7 +27,7 @@
#define DEFAULT_TRACER "function_graph"
struct perf_ftrace {
struct perf_evlist *evlist;
struct evlist *evlist;
struct target target;
const char *tracer;
struct list_head filters;
+4 -4
View File
@@ -96,7 +96,7 @@ static int perf_event__repipe_op2_synth(struct perf_session *session,
static int perf_event__repipe_attr(struct perf_tool *tool,
union perf_event *event,
struct perf_evlist **pevlist)
struct evlist **pevlist)
{
struct perf_inject *inject = container_of(tool, struct perf_inject,
tool);
@@ -567,7 +567,7 @@ static int drop_sample(struct perf_tool *tool __maybe_unused,
static void strip_init(struct perf_inject *inject)
{
struct perf_evlist *evlist = inject->session->evlist;
struct evlist *evlist = inject->session->evlist;
struct evsel *evsel;
inject->tool.context_switch = perf_event__drop;
@@ -590,7 +590,7 @@ static bool has_tracking(struct evsel *evsel)
* their selected event to exist, except if there is only 1 selected event left
* and it has a compatible sample type.
*/
static bool ok_to_remove(struct perf_evlist *evlist,
static bool ok_to_remove(struct evlist *evlist,
struct evsel *evsel_to_remove)
{
struct evsel *evsel;
@@ -614,7 +614,7 @@ static bool ok_to_remove(struct perf_evlist *evlist,
static void strip_fini(struct perf_inject *inject)
{
struct perf_evlist *evlist = inject->session->evlist;
struct evlist *evlist = inject->session->evlist;
struct evsel *evsel, *tmp;
/* Remove non-synthesized evsels if possible */
+4 -4
View File
@@ -743,7 +743,7 @@ static bool verify_vcpu(int vcpu)
static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
u64 *mmap_time)
{
struct perf_evlist *evlist = kvm->evlist;
struct evlist *evlist = kvm->evlist;
union perf_event *event;
struct perf_mmap *md;
u64 timestamp;
@@ -1012,7 +1012,7 @@ static int kvm_live_open_events(struct perf_kvm_stat *kvm)
{
int err, rc = -1;
struct evsel *pos;
struct perf_evlist *evlist = kvm->evlist;
struct evlist *evlist = kvm->evlist;
char sbuf[STRERR_BUFSIZE];
perf_evlist__config(evlist, &kvm->opts, NULL);
@@ -1283,9 +1283,9 @@ kvm_events_report(struct perf_kvm_stat *kvm, int argc, const char **argv)
}
#ifdef HAVE_TIMERFD_SUPPORT
static struct perf_evlist *kvm_live_event_list(void)
static struct evlist *kvm_live_event_list(void)
{
struct perf_evlist *evlist;
struct evlist *evlist;
char *tp, *name, *sys;
int err = -1;
const char * const *events_tp;
+7 -7
View File
@@ -73,7 +73,7 @@ struct record {
u64 bytes_written;
struct perf_data data;
struct auxtrace_record *itr;
struct perf_evlist *evlist;
struct evlist *evlist;
struct perf_session *session;
int realtime_prio;
bool no_buildid;
@@ -346,7 +346,7 @@ static void record__aio_set_pos(int trace_fd, off_t pos)
static void record__aio_mmap_read_sync(struct record *rec)
{
int i;
struct perf_evlist *evlist = rec->evlist;
struct evlist *evlist = rec->evlist;
struct perf_mmap *maps = evlist->mmap;
if (!record__aio_enabled(rec))
@@ -672,7 +672,7 @@ static int record__auxtrace_init(struct record *rec __maybe_unused)
#endif
static int record__mmap_evlist(struct record *rec,
struct perf_evlist *evlist)
struct evlist *evlist)
{
struct record_opts *opts = &rec->opts;
char msg[512];
@@ -714,7 +714,7 @@ static int record__open(struct record *rec)
{
char msg[BUFSIZ];
struct evsel *pos;
struct perf_evlist *evlist = rec->evlist;
struct evlist *evlist = rec->evlist;
struct perf_session *session = rec->session;
struct record_opts *opts = &rec->opts;
int rc = 0;
@@ -904,7 +904,7 @@ static size_t zstd_compress(struct perf_session *session, void *dst, size_t dst_
return compressed;
}
static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evlist,
static int record__mmap_read_evlist(struct record *rec, struct evlist *evlist,
bool overwrite, bool synch)
{
u64 bytes_written = rec->bytes_written;
@@ -1165,7 +1165,7 @@ perf_event__synth_time_conv(const struct perf_event_mmap_page *pc __maybe_unused
}
static const struct perf_event_mmap_page *
perf_evlist__pick_pc(struct perf_evlist *evlist)
perf_evlist__pick_pc(struct evlist *evlist)
{
if (evlist) {
if (evlist->mmap && evlist->mmap[0].base)
@@ -1313,7 +1313,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
struct perf_data *data = &rec->data;
struct perf_session *session;
bool disabled = false, draining = false;
struct perf_evlist *sb_evlist = NULL;
struct evlist *sb_evlist = NULL;
int fd;
float ratio = 0;
+4 -4
View File
@@ -193,7 +193,7 @@ out:
}
static void setup_forced_leader(struct report *report,
struct perf_evlist *evlist)
struct evlist *evlist)
{
if (report->group_set)
perf_evlist__force_leader(evlist);
@@ -459,7 +459,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
return ret + fprintf(fp, "\n#\n");
}
static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
static int perf_evlist__tty_browse_hists(struct evlist *evlist,
struct report *rep,
const char *help)
{
@@ -532,7 +532,7 @@ static void report__warn_kptr_restrict(const struct report *rep)
static int report__gtk_browse_hists(struct report *rep, const char *help)
{
int (*hist_browser)(struct perf_evlist *evlist, const char *help,
int (*hist_browser)(struct evlist *evlist, const char *help,
struct hist_browser_timer *timer, float min_pcnt);
hist_browser = dlsym(perf_gtk_handle, "perf_evlist__gtk_browse_hists");
@@ -549,7 +549,7 @@ static int report__browse_hists(struct report *rep)
{
int ret;
struct perf_session *session = rep->session;
struct perf_evlist *evlist = session->evlist;
struct evlist *evlist = session->evlist;
const char *help = perf_tip(system_path(TIPDIR));
if (help == NULL) {
+2 -2
View File
@@ -2924,7 +2924,7 @@ static int perf_timehist__process_sample(struct perf_tool *tool,
}
static int timehist_check_attr(struct perf_sched *sched,
struct perf_evlist *evlist)
struct evlist *evlist)
{
struct evsel *evsel;
struct evsel_runtime *er;
@@ -2963,7 +2963,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
};
struct perf_session *session;
struct perf_evlist *evlist;
struct evlist *evlist;
int err = -1;
/*
+5 -5
View File
@@ -1636,7 +1636,7 @@ 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 evsel *evsel;
int max = 0;
@@ -2018,10 +2018,10 @@ 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 evlist *evlist;
struct evsel *evsel, *pos;
int err;
static struct evsel_script *es;
@@ -2388,7 +2388,7 @@ 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 evlist *evlist = script->session->evlist;
struct evsel *evsel;
evlist__for_each_entry(evlist, evsel) {
@@ -3256,7 +3256,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;
+1 -1
View File
@@ -130,7 +130,7 @@ static const char *smi_cost_attrs = {
"}"
};
static struct perf_evlist *evsel_list;
static struct evlist *evsel_list;
static struct target target = {
.uid = UINT_MAX,

Some files were not shown because too many files have changed in this diff Show More