Skip to content

Commit 32dcd02

Browse files
olsajiriacmel
authored andcommitted
perf evsel: Rename struct perf_evsel to struct evsel
Rename struct perf_evsel to struct evsel, so we don't have a name clash when we add struct perf_evsel in libperf. Committer notes: Added fixes for arm64, provided by Jiri. 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-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 9749b90 commit 32dcd02

113 files changed

Lines changed: 1056 additions & 1056 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎tools/perf/arch/arm/util/auxtrace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct auxtrace_record
5353
*auxtrace_record__init(struct perf_evlist *evlist, int *err)
5454
{
5555
struct perf_pmu *cs_etm_pmu;
56-
struct perf_evsel *evsel;
56+
struct evsel *evsel;
5757
bool found_etm = false;
5858
bool found_spe = false;
5959
static struct perf_pmu **arm_spe_pmus = NULL;

‎tools/perf/arch/arm/util/cs-etm.c‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static const char *metadata_etmv4_ro[CS_ETMV4_PRIV_MAX] = {
5555
static bool cs_etm_is_etmv4(struct auxtrace_record *itr, int cpu);
5656

5757
static int cs_etm_set_context_id(struct auxtrace_record *itr,
58-
struct perf_evsel *evsel, int cpu)
58+
struct evsel *evsel, int cpu)
5959
{
6060
struct cs_etm_recording *ptr;
6161
struct perf_pmu *cs_etm_pmu;
@@ -104,7 +104,7 @@ static int cs_etm_set_context_id(struct auxtrace_record *itr,
104104
}
105105

106106
static int cs_etm_set_timestamp(struct auxtrace_record *itr,
107-
struct perf_evsel *evsel, int cpu)
107+
struct evsel *evsel, int cpu)
108108
{
109109
struct cs_etm_recording *ptr;
110110
struct perf_pmu *cs_etm_pmu;
@@ -152,7 +152,7 @@ static int cs_etm_set_timestamp(struct auxtrace_record *itr,
152152
}
153153

154154
static int cs_etm_set_option(struct auxtrace_record *itr,
155-
struct perf_evsel *evsel, u32 option)
155+
struct evsel *evsel, u32 option)
156156
{
157157
int i, err = -EINVAL;
158158
struct perf_cpu_map *event_cpus = evsel->evlist->cpus;
@@ -208,7 +208,7 @@ static int cs_etm_parse_snapshot_options(struct auxtrace_record *itr,
208208
}
209209

210210
static int cs_etm_set_sink_attr(struct perf_pmu *pmu,
211-
struct perf_evsel *evsel)
211+
struct evsel *evsel)
212212
{
213213
char msg[BUFSIZ], path[PATH_MAX], *sink;
214214
struct perf_evsel_config_term *term;
@@ -252,7 +252,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
252252
struct cs_etm_recording *ptr =
253253
container_of(itr, struct cs_etm_recording, itr);
254254
struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
255-
struct perf_evsel *evsel, *cs_etm_evsel = NULL;
255+
struct evsel *evsel, *cs_etm_evsel = NULL;
256256
struct perf_cpu_map *cpus = evlist->cpus;
257257
bool privileged = (geteuid() == 0 || perf_event_paranoid() < 0);
258258
int err = 0;
@@ -407,7 +407,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
407407

408408
/* Add dummy event to keep tracking */
409409
if (opts->full_auxtrace) {
410-
struct perf_evsel *tracking_evsel;
410+
struct evsel *tracking_evsel;
411411

412412
err = parse_events(evlist, "dummy:u", NULL);
413413
if (err)
@@ -435,7 +435,7 @@ static u64 cs_etm_get_config(struct auxtrace_record *itr)
435435
container_of(itr, struct cs_etm_recording, itr);
436436
struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
437437
struct perf_evlist *evlist = ptr->evlist;
438-
struct perf_evsel *evsel;
438+
struct evsel *evsel;
439439

440440
evlist__for_each_entry(evlist, evsel) {
441441
if (evsel->attr.type == cs_etm_pmu->type) {
@@ -817,7 +817,7 @@ static int cs_etm_snapshot_start(struct auxtrace_record *itr)
817817
{
818818
struct cs_etm_recording *ptr =
819819
container_of(itr, struct cs_etm_recording, itr);
820-
struct perf_evsel *evsel;
820+
struct evsel *evsel;
821821

822822
evlist__for_each_entry(ptr->evlist, evsel) {
823823
if (evsel->attr.type == ptr->cs_etm_pmu->type)
@@ -830,7 +830,7 @@ static int cs_etm_snapshot_finish(struct auxtrace_record *itr)
830830
{
831831
struct cs_etm_recording *ptr =
832832
container_of(itr, struct cs_etm_recording, itr);
833-
struct perf_evsel *evsel;
833+
struct evsel *evsel;
834834

835835
evlist__for_each_entry(ptr->evlist, evsel) {
836836
if (evsel->attr.type == ptr->cs_etm_pmu->type)
@@ -858,7 +858,7 @@ static int cs_etm_read_finish(struct auxtrace_record *itr, int idx)
858858
{
859859
struct cs_etm_recording *ptr =
860860
container_of(itr, struct cs_etm_recording, itr);
861-
struct perf_evsel *evsel;
861+
struct evsel *evsel;
862862

863863
evlist__for_each_entry(ptr->evlist, evsel) {
864864
if (evsel->attr.type == ptr->cs_etm_pmu->type)

‎tools/perf/arch/arm64/util/arm-spe.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
6565
struct arm_spe_recording *sper =
6666
container_of(itr, struct arm_spe_recording, itr);
6767
struct perf_pmu *arm_spe_pmu = sper->arm_spe_pmu;
68-
struct perf_evsel *evsel, *arm_spe_evsel = NULL;
68+
struct evsel *evsel, *arm_spe_evsel = NULL;
6969
bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
70-
struct perf_evsel *tracking_evsel;
70+
struct evsel *tracking_evsel;
7171
int err;
7272

7373
sper->evlist = evlist;
@@ -160,7 +160,7 @@ static int arm_spe_read_finish(struct auxtrace_record *itr, int idx)
160160
{
161161
struct arm_spe_recording *sper =
162162
container_of(itr, struct arm_spe_recording, itr);
163-
struct perf_evsel *evsel;
163+
struct evsel *evsel;
164164

165165
evlist__for_each_entry(sper->evlist, evsel) {
166166
if (evsel->attr.type == sper->arm_spe_pmu->type)

‎tools/perf/arch/powerpc/util/kvm-stat.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const char *ppc_book3s_hv_kvm_tp[] = {
3232
const char *kvm_events_tp[NR_TPS + 1];
3333
const char *kvm_exit_reason;
3434

35-
static void hcall_event_get_key(struct perf_evsel *evsel,
35+
static void hcall_event_get_key(struct evsel *evsel,
3636
struct perf_sample *sample,
3737
struct event_key *key)
3838
{
@@ -55,14 +55,14 @@ static const char *get_hcall_exit_reason(u64 exit_code)
5555
return "UNKNOWN";
5656
}
5757

58-
static bool hcall_event_end(struct perf_evsel *evsel,
58+
static bool hcall_event_end(struct evsel *evsel,
5959
struct perf_sample *sample __maybe_unused,
6060
struct event_key *key __maybe_unused)
6161
{
6262
return (!strcmp(evsel->name, kvm_events_tp[3]));
6363
}
6464

65-
static bool hcall_event_begin(struct perf_evsel *evsel,
65+
static bool hcall_event_begin(struct evsel *evsel,
6666
struct perf_sample *sample, struct event_key *key)
6767
{
6868
if (!strcmp(evsel->name, kvm_events_tp[2])) {

‎tools/perf/arch/s390/util/auxtrace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
8686
int *err)
8787
{
8888
struct auxtrace_record *aux;
89-
struct perf_evsel *pos;
89+
struct evsel *pos;
9090
int diagnose = 0;
9191

9292
*err = 0;

‎tools/perf/arch/s390/util/kvm-stat.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const char *kvm_exit_reason = "icptcode";
2323
const char *kvm_entry_trace = "kvm:kvm_s390_sie_enter";
2424
const char *kvm_exit_trace = "kvm:kvm_s390_sie_exit";
2525

26-
static void event_icpt_insn_get_key(struct perf_evsel *evsel,
26+
static void event_icpt_insn_get_key(struct evsel *evsel,
2727
struct perf_sample *sample,
2828
struct event_key *key)
2929
{
@@ -34,23 +34,23 @@ static void event_icpt_insn_get_key(struct perf_evsel *evsel,
3434
key->exit_reasons = sie_icpt_insn_codes;
3535
}
3636

37-
static void event_sigp_get_key(struct perf_evsel *evsel,
37+
static void event_sigp_get_key(struct evsel *evsel,
3838
struct perf_sample *sample,
3939
struct event_key *key)
4040
{
4141
key->key = perf_evsel__intval(evsel, sample, "order_code");
4242
key->exit_reasons = sie_sigp_order_codes;
4343
}
4444

45-
static void event_diag_get_key(struct perf_evsel *evsel,
45+
static void event_diag_get_key(struct evsel *evsel,
4646
struct perf_sample *sample,
4747
struct event_key *key)
4848
{
4949
key->key = perf_evsel__intval(evsel, sample, "code");
5050
key->exit_reasons = sie_diagnose_codes;
5151
}
5252

53-
static void event_icpt_prog_get_key(struct perf_evsel *evsel,
53+
static void event_icpt_prog_get_key(struct evsel *evsel,
5454
struct perf_sample *sample,
5555
struct event_key *key)
5656
{

‎tools/perf/arch/x86/tests/intel-cqm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static pid_t spawn(void)
4141
int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
4242
{
4343
struct perf_evlist *evlist = NULL;
44-
struct perf_evsel *evsel = NULL;
44+
struct evsel *evsel = NULL;
4545
struct perf_event_attr pe;
4646
int i, fd[2], flag, ret;
4747
size_t mmap_len;

‎tools/perf/arch/x86/tests/perf-time-to-tsc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
5252
struct perf_thread_map *threads = NULL;
5353
struct perf_cpu_map *cpus = NULL;
5454
struct perf_evlist *evlist = NULL;
55-
struct perf_evsel *evsel = NULL;
55+
struct evsel *evsel = NULL;
5656
int err = -1, ret, i;
5757
const char *comm1, *comm2;
5858
struct perf_tsc_conversion tc;

‎tools/perf/arch/x86/util/auxtrace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
2121
{
2222
struct perf_pmu *intel_pt_pmu;
2323
struct perf_pmu *intel_bts_pmu;
24-
struct perf_evsel *evsel;
24+
struct evsel *evsel;
2525
bool found_pt = false;
2626
bool found_bts = false;
2727

‎tools/perf/arch/x86/util/intel-bts.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
105105
struct intel_bts_recording *btsr =
106106
container_of(itr, struct intel_bts_recording, itr);
107107
struct perf_pmu *intel_bts_pmu = btsr->intel_bts_pmu;
108-
struct perf_evsel *evsel, *intel_bts_evsel = NULL;
108+
struct evsel *evsel, *intel_bts_evsel = NULL;
109109
const struct perf_cpu_map *cpus = evlist->cpus;
110110
bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
111111

@@ -220,7 +220,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
220220

221221
/* Add dummy event to keep tracking */
222222
if (opts->full_auxtrace) {
223-
struct perf_evsel *tracking_evsel;
223+
struct evsel *tracking_evsel;
224224
int err;
225225

226226
err = parse_events(evlist, "dummy:u", NULL);
@@ -313,7 +313,7 @@ static int intel_bts_snapshot_start(struct auxtrace_record *itr)
313313
{
314314
struct intel_bts_recording *btsr =
315315
container_of(itr, struct intel_bts_recording, itr);
316-
struct perf_evsel *evsel;
316+
struct evsel *evsel;
317317

318318
evlist__for_each_entry(btsr->evlist, evsel) {
319319
if (evsel->attr.type == btsr->intel_bts_pmu->type)
@@ -326,7 +326,7 @@ static int intel_bts_snapshot_finish(struct auxtrace_record *itr)
326326
{
327327
struct intel_bts_recording *btsr =
328328
container_of(itr, struct intel_bts_recording, itr);
329-
struct perf_evsel *evsel;
329+
struct evsel *evsel;
330330

331331
evlist__for_each_entry(btsr->evlist, evsel) {
332332
if (evsel->attr.type == btsr->intel_bts_pmu->type)
@@ -408,7 +408,7 @@ static int intel_bts_read_finish(struct auxtrace_record *itr, int idx)
408408
{
409409
struct intel_bts_recording *btsr =
410410
container_of(itr, struct intel_bts_recording, itr);
411-
struct perf_evsel *evsel;
411+
struct evsel *evsel;
412412

413413
evlist__for_each_entry(btsr->evlist, evsel) {
414414
if (evsel->attr.type == btsr->intel_bts_pmu->type)

0 commit comments

Comments
 (0)