Skip to content

Commit a1cf3a7

Browse files
olsajiriacmel
authored andcommitted
perf evlist: Rename perf_evlist__add() to evlist__add()
Rename perf_evlist__add() to evlist__add(), so we don't have a name clash when we add perf_evlist__add() in libperf. 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-13-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 365c3ae commit a1cf3a7

8 files changed

Lines changed: 21 additions & 21 deletions

File tree

‎tools/perf/builtin-trace.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,7 @@ static int trace__record(struct trace *trace, int argc, const char **argv)
26162616

26172617
static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp);
26182618

2619-
static bool perf_evlist__add_vfs_getname(struct evlist *evlist)
2619+
static bool evlist__add_vfs_getname(struct evlist *evlist)
26202620
{
26212621
bool found = false;
26222622
struct evsel *evsel, *tmp;
@@ -2719,8 +2719,8 @@ static int trace__add_syscall_newtp(struct trace *trace)
27192719
perf_evsel__config_callchain(sys_enter, &trace->opts, &callchain_param);
27202720
perf_evsel__config_callchain(sys_exit, &trace->opts, &callchain_param);
27212721

2722-
perf_evlist__add(evlist, sys_enter);
2723-
perf_evlist__add(evlist, sys_exit);
2722+
evlist__add(evlist, sys_enter);
2723+
evlist__add(evlist, sys_exit);
27242724

27252725
if (callchain_param.enabled && !trace->kernel_syscallchains) {
27262726
/*
@@ -3264,23 +3264,23 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
32643264
goto out_error_raw_syscalls;
32653265

32663266
if (trace->trace_syscalls)
3267-
trace->vfs_getname = perf_evlist__add_vfs_getname(evlist);
3267+
trace->vfs_getname = evlist__add_vfs_getname(evlist);
32683268
}
32693269

32703270
if ((trace->trace_pgfaults & TRACE_PFMAJ)) {
32713271
pgfault_maj = perf_evsel__new_pgfault(PERF_COUNT_SW_PAGE_FAULTS_MAJ);
32723272
if (pgfault_maj == NULL)
32733273
goto out_error_mem;
32743274
perf_evsel__config_callchain(pgfault_maj, &trace->opts, &callchain_param);
3275-
perf_evlist__add(evlist, pgfault_maj);
3275+
evlist__add(evlist, pgfault_maj);
32763276
}
32773277

32783278
if ((trace->trace_pgfaults & TRACE_PFMIN)) {
32793279
pgfault_min = perf_evsel__new_pgfault(PERF_COUNT_SW_PAGE_FAULTS_MIN);
32803280
if (pgfault_min == NULL)
32813281
goto out_error_mem;
32823282
perf_evsel__config_callchain(pgfault_min, &trace->opts, &callchain_param);
3283-
perf_evlist__add(evlist, pgfault_min);
3283+
evlist__add(evlist, pgfault_min);
32843284
}
32853285

32863286
if (trace->sched &&

‎tools/perf/tests/mmap-basic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
8282
evsels[i]->attr.wakeup_events = 1;
8383
perf_evsel__set_sample_id(evsels[i], false);
8484

85-
perf_evlist__add(evlist, evsels[i]);
85+
evlist__add(evlist, evsels[i]);
8686

8787
if (perf_evsel__open(evsels[i], cpus, threads) < 0) {
8888
pr_debug("failed to open counter: %s, "

‎tools/perf/tests/openat-syscall-tp-fields.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
4848
goto out_delete_evlist;
4949
}
5050

51-
perf_evlist__add(evlist, evsel);
51+
evlist__add(evlist, evsel);
5252

5353
err = perf_evlist__create_maps(evlist, &opts.target);
5454
if (err < 0) {

‎tools/perf/tests/sw-clock.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
5454
pr_debug("perf_evsel__new\n");
5555
goto out_delete_evlist;
5656
}
57-
perf_evlist__add(evlist, evsel);
57+
evlist__add(evlist, evsel);
5858

5959
cpus = cpu_map__dummy_new();
6060
threads = thread_map__new_by_tid(getpid());

‎tools/perf/util/evlist.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static void perf_evlist__propagate_maps(struct evlist *evlist)
177177
__perf_evlist__propagate_maps(evlist, evsel);
178178
}
179179

180-
void perf_evlist__add(struct evlist *evlist, struct evsel *entry)
180+
void evlist__add(struct evlist *evlist, struct evsel *entry)
181181
{
182182
entry->evlist = evlist;
183183
list_add_tail(&entry->node, &evlist->entries);
@@ -204,7 +204,7 @@ void perf_evlist__splice_list_tail(struct evlist *evlist,
204204

205205
__evlist__for_each_entry_safe(list, temp, evsel) {
206206
list_del_init(&evsel->node);
207-
perf_evlist__add(evlist, evsel);
207+
evlist__add(evlist, evsel);
208208
}
209209
}
210210

@@ -237,7 +237,7 @@ int __perf_evlist__add_default(struct evlist *evlist, bool precise)
237237
if (evsel == NULL)
238238
return -ENOMEM;
239239

240-
perf_evlist__add(evlist, evsel);
240+
evlist__add(evlist, evsel);
241241
return 0;
242242
}
243243

@@ -253,11 +253,11 @@ int perf_evlist__add_dummy(struct evlist *evlist)
253253
if (evsel == NULL)
254254
return -ENOMEM;
255255

256-
perf_evlist__add(evlist, evsel);
256+
evlist__add(evlist, evsel);
257257
return 0;
258258
}
259259

260-
static int perf_evlist__add_attrs(struct evlist *evlist,
260+
static int evlist__add_attrs(struct evlist *evlist,
261261
struct perf_event_attr *attrs, size_t nr_attrs)
262262
{
263263
struct evsel *evsel, *n;
@@ -289,7 +289,7 @@ int __perf_evlist__add_default_attrs(struct evlist *evlist,
289289
for (i = 0; i < nr_attrs; i++)
290290
event_attr_init(attrs + i);
291291

292-
return perf_evlist__add_attrs(evlist, attrs, nr_attrs);
292+
return evlist__add_attrs(evlist, attrs, nr_attrs);
293293
}
294294

295295
struct evsel *
@@ -330,7 +330,7 @@ int perf_evlist__add_newtp(struct evlist *evlist,
330330
return -1;
331331

332332
evsel->handler = handler;
333-
perf_evlist__add(evlist, evsel);
333+
evlist__add(evlist, evsel);
334334
return 0;
335335
}
336336

@@ -1854,7 +1854,7 @@ int perf_evlist__add_sb_event(struct evlist **evlist,
18541854

18551855
evsel->side_band.cb = cb;
18561856
evsel->side_band.data = data;
1857-
perf_evlist__add(*evlist, evsel);
1857+
evlist__add(*evlist, evsel);
18581858
return 0;
18591859

18601860
out_err:

‎tools/perf/util/evlist.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
7373
void perf_evlist__exit(struct evlist *evlist);
7474
void evlist__delete(struct evlist *evlist);
7575

76-
void perf_evlist__add(struct evlist *evlist, struct evsel *entry);
76+
void evlist__add(struct evlist *evlist, struct evsel *entry);
7777
void perf_evlist__remove(struct evlist *evlist, struct evsel *evsel);
7878

7979
int __perf_evlist__add_default(struct evlist *evlist, bool precise);

‎tools/perf/util/header.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3593,7 +3593,7 @@ int perf_session__read_header(struct perf_session *session)
35933593
* Do it before so that if perf_evsel__alloc_id fails, this
35943594
* entry gets purged too at evlist__delete().
35953595
*/
3596-
perf_evlist__add(session->evlist, evsel);
3596+
evlist__add(session->evlist, evsel);
35973597

35983598
nr_ids = f_attr.ids.size / sizeof(u64);
35993599
/*
@@ -4025,7 +4025,7 @@ int perf_event__process_attr(struct perf_tool *tool __maybe_unused,
40254025
if (evsel == NULL)
40264026
return -ENOMEM;
40274027

4028-
perf_evlist__add(evlist, evsel);
4028+
evlist__add(evlist, evsel);
40294029

40304030
ids = event->header.size;
40314031
ids -= (void *)&event->attr.id - (void *)event;

‎tools/perf/util/python.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ static PyObject *pyrf_evlist__add(struct pyrf_evlist *pevlist,
974974
Py_INCREF(pevsel);
975975
evsel = &((struct pyrf_evsel *)pevsel)->evsel;
976976
evsel->idx = evlist->nr_entries;
977-
perf_evlist__add(evlist, evsel);
977+
evlist__add(evlist, evsel);
978978

979979
return Py_BuildValue("i", evlist->nr_entries);
980980
}

0 commit comments

Comments
 (0)