perf evlist: Rename perf_evlist__delete() to evlist__delete()

Rename perf_evlist__delete() to evlist__delete(), so we don't have a
name clash when we add perf_evlist__delete() 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-10-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jiri Olsa 2019-07-21 13:23:56 +02:00 committed by Arnaldo Carvalho de Melo
parent 0f98b11c61
commit c12995a554
32 changed files with 42 additions and 42 deletions

View File

@ -124,6 +124,6 @@ int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subt
kill(pid, SIGKILL);
wait(NULL);
out:
perf_evlist__delete(evlist);
evlist__delete(evlist);
return err;
}

View File

@ -163,6 +163,6 @@ next_event:
err = 0;
out_err:
perf_evlist__delete(evlist);
evlist__delete(evlist);
return err;
}

View File

@ -508,7 +508,7 @@ int cmd_ftrace(int argc, const char **argv)
ret = __cmd_ftrace(&ftrace, argc, argv);
out_delete_evlist:
perf_evlist__delete(ftrace.evlist);
evlist__delete(ftrace.evlist);
out_delete_filters:
delete_filter_func(&ftrace.filters);

View File

@ -1325,7 +1325,7 @@ static struct evlist *kvm_live_event_list(void)
out:
if (err) {
perf_evlist__delete(evlist);
evlist__delete(evlist);
evlist = NULL;
}
@ -1460,7 +1460,7 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
out:
perf_session__delete(kvm->session);
kvm->session = NULL;
perf_evlist__delete(kvm->evlist);
evlist__delete(kvm->evlist);
return err;
}

View File

@ -2449,7 +2449,7 @@ int cmd_record(int argc, const char **argv)
err = __cmd_record(&record, argc, argv);
out:
perf_evlist__delete(rec->evlist);
evlist__delete(rec->evlist);
symbol__exit();
auxtrace_record__free(rec->itr);
return err;

View File

@ -2015,7 +2015,7 @@ out:
if (smi_cost && smi_reset)
sysfs__write_int(FREEZE_ON_SMI_PATH, 0);
perf_evlist__delete(evsel_list);
evlist__delete(evsel_list);
runtime_stat_delete(&stat_config);

View File

@ -1661,7 +1661,7 @@ int cmd_top(int argc, const char **argv)
perf_evlist__stop_sb_thread(sb_evlist);
out_delete_evlist:
perf_evlist__delete(top.evlist);
evlist__delete(top.evlist);
perf_session__delete(top.session);
return status;

View File

@ -3498,7 +3498,7 @@ out_disable:
out_delete_evlist:
trace__symbols__exit(trace);
perf_evlist__delete(evlist);
evlist__delete(evlist);
cgroup__put(trace->cgroup);
trace->evlist = NULL;
trace->live = false;

View File

@ -150,6 +150,6 @@ int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __m
ret = TEST_OK;
out_delete_evlist:
perf_evlist__delete(evlist);
evlist__delete(evlist);
return ret;
}

View File

@ -200,7 +200,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
ret = TEST_OK;
out_delete_evlist:
perf_evlist__delete(evlist);
evlist__delete(evlist);
return ret;
}

View File

@ -658,7 +658,7 @@ static int do_test_code_reading(bool try_kcore)
cpu_map__get(cpus);
thread_map__get(threads);
perf_evlist__set_maps(evlist, NULL, NULL);
perf_evlist__delete(evlist);
evlist__delete(evlist);
evlist = NULL;
continue;
}
@ -703,7 +703,7 @@ out_put:
out_err:
if (evlist) {
perf_evlist__delete(evlist);
evlist__delete(evlist);
} else {
cpu_map__put(cpus);
thread_map__put(threads);

View File

@ -204,7 +204,7 @@ static int test_times(int (attach)(struct evlist *),
count.ena, count.run);
out_err:
perf_evlist__delete(evlist);
evlist__delete(evlist);
return !err ? TEST_OK : TEST_FAIL;
}

View File

@ -60,7 +60,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
}
}
perf_evlist__delete(evlist);
evlist__delete(evlist);
return ret;
}
@ -91,7 +91,7 @@ static int __perf_evsel__name_array_test(const char *names[], int nr_names)
}
out_delete_evlist:
perf_evlist__delete(evlist);
evlist__delete(evlist);
return err;
}

View File

@ -731,7 +731,7 @@ int test__hists_cumulate(struct test *test __maybe_unused, int subtest __maybe_u
out:
/* tear down everything */
perf_evlist__delete(evlist);
evlist__delete(evlist);
machines__exit(&machines);
return err;

View File

@ -321,7 +321,7 @@ int test__hists_filter(struct test *test __maybe_unused, int subtest __maybe_unu
out:
/* tear down everything */
perf_evlist__delete(evlist);
evlist__delete(evlist);
reset_output_field();
machines__exit(&machines);

View File

@ -334,7 +334,7 @@ int test__hists_link(struct test *test __maybe_unused, int subtest __maybe_unuse
out:
/* tear down everything */
perf_evlist__delete(evlist);
evlist__delete(evlist);
reset_output_field();
machines__exit(&machines);

View File

@ -618,7 +618,7 @@ int test__hists_output(struct test *test __maybe_unused, int subtest __maybe_unu
out:
/* tear down everything */
perf_evlist__delete(evlist);
evlist__delete(evlist);
machines__exit(&machines);
return err;

View File

@ -147,7 +147,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
out_err:
if (evlist) {
perf_evlist__disable(evlist);
perf_evlist__delete(evlist);
evlist__delete(evlist);
} else {
cpu_map__put(cpus);
thread_map__put(threads);

View File

@ -151,7 +151,7 @@ out_init:
}
out_delete_evlist:
perf_evlist__delete(evlist);
evlist__delete(evlist);
cpus = NULL;
threads = NULL;
out_free_cpus:

View File

@ -134,7 +134,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
out_ok:
err = 0;
out_delete_evlist:
perf_evlist__delete(evlist);
evlist__delete(evlist);
out:
return err;
}

View File

@ -1790,7 +1790,7 @@ static int test_event(struct evlist_test *e)
ret = e->check(evlist);
}
perf_evlist__delete(evlist);
evlist__delete(evlist);
return ret;
}

View File

@ -46,7 +46,7 @@ static int process_events(union perf_event **events, size_t count)
for (i = 0; i < count && !err; i++)
err = process_event(&evlist, events[i]);
perf_evlist__delete(evlist);
evlist__delete(evlist);
return err;
}

View File

@ -325,7 +325,7 @@ found_exit:
++errs;
}
out_delete_evlist:
perf_evlist__delete(evlist);
evlist__delete(evlist);
out:
return (err < 0 || errs > 0) ? -1 : 0;
}

View File

@ -128,7 +128,7 @@ out_free_maps:
cpu_map__put(cpus);
thread_map__put(threads);
out_delete_evlist:
perf_evlist__delete(evlist);
evlist__delete(evlist);
return err;
}

View File

@ -567,7 +567,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
out:
if (evlist) {
perf_evlist__disable(evlist);
perf_evlist__delete(evlist);
evlist__delete(evlist);
} else {
cpu_map__put(cpus);
thread_map__put(threads);

View File

@ -138,6 +138,6 @@ out_free_maps:
cpu_map__put(cpus);
thread_map__put(threads);
out_delete_evlist:
perf_evlist__delete(evlist);
evlist__delete(evlist);
return err;
}

View File

@ -1319,7 +1319,7 @@ static void cleanup_events(struct perf_session *session)
zfree(&evsel->priv);
}
perf_evlist__delete(evlist);
evlist__delete(evlist);
session->evlist = NULL;
}

View File

@ -70,7 +70,7 @@ struct evlist *perf_evlist__new_default(void)
struct evlist *evlist = evlist__new();
if (evlist && perf_evlist__add_default(evlist)) {
perf_evlist__delete(evlist);
evlist__delete(evlist);
evlist = NULL;
}
@ -82,7 +82,7 @@ struct evlist *perf_evlist__new_dummy(void)
struct evlist *evlist = evlist__new();
if (evlist && perf_evlist__add_dummy(evlist)) {
perf_evlist__delete(evlist);
evlist__delete(evlist);
evlist = NULL;
}
@ -134,7 +134,7 @@ void perf_evlist__exit(struct evlist *evlist)
fdarray__exit(&evlist->pollfd);
}
void perf_evlist__delete(struct evlist *evlist)
void evlist__delete(struct evlist *evlist)
{
if (evlist == NULL)
return;
@ -1859,7 +1859,7 @@ int perf_evlist__add_sb_event(struct evlist **evlist,
out_err:
if (new_evlist) {
perf_evlist__delete(*evlist);
evlist__delete(*evlist);
*evlist = NULL;
}
return -1;
@ -1938,7 +1938,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist,
return 0;
out_delete_evlist:
perf_evlist__delete(evlist);
evlist__delete(evlist);
evlist = NULL;
return -1;
}
@ -1949,5 +1949,5 @@ void perf_evlist__stop_sb_thread(struct evlist *evlist)
return;
evlist->thread.done = 1;
pthread_join(evlist->thread.th, NULL);
perf_evlist__delete(evlist);
evlist__delete(evlist);
}

View File

@ -71,7 +71,7 @@ struct evlist *perf_evlist__new_dummy(void);
void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
struct perf_thread_map *threads);
void perf_evlist__exit(struct evlist *evlist);
void perf_evlist__delete(struct evlist *evlist);
void evlist__delete(struct evlist *evlist);
void perf_evlist__add(struct evlist *evlist, struct evsel *entry);
void perf_evlist__remove(struct evlist *evlist, struct evsel *evsel);

View File

@ -3591,7 +3591,7 @@ int perf_session__read_header(struct perf_session *session)
evsel->needs_swap = header->needs_swap;
/*
* Do it before so that if perf_evsel__alloc_id fails, this
* entry gets purged too at perf_evlist__delete().
* entry gets purged too at evlist__delete().
*/
perf_evlist__add(session->evlist, evsel);
@ -3628,7 +3628,7 @@ out_errno:
return -errno;
out_delete_evlist:
perf_evlist__delete(session->evlist);
evlist__delete(session->evlist);
session->evlist = NULL;
return -ENOMEM;
}

View File

@ -1935,7 +1935,7 @@ int parse_events(struct evlist *evlist, const char *str,
/*
* There are 2 users - builtin-record and builtin-test objects.
* Both call perf_evlist__delete in case of error, so we dont
* Both call evlist__delete in case of error, so we dont
* need to bother.
*/
return ret;

View File

@ -53,7 +53,7 @@ static int perf_do_probe_api(setup_probe_fn_t fn, int cpu, const char *str)
err = 0;
out_delete:
perf_evlist__delete(evlist);
evlist__delete(evlist);
return err;
}
@ -299,7 +299,7 @@ bool perf_evlist__can_select_event(struct evlist *evlist, const char *str)
ret = true;
out_delete:
perf_evlist__delete(temp_evlist);
evlist__delete(temp_evlist);
return ret;
}