perf evlist: Rename perf_evlist__new() to evlist__new()
authorJiri Olsa <jolsa@kernel.org>
Sun, 21 Jul 2019 11:23:55 +0000 (13:23 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 29 Jul 2019 21:34:43 +0000 (18:34 -0300)
Rename perf_evlist__new() to evlist__new(), so we don't have a name
clash when we add perf_evlist__new() 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-9-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
28 files changed:
tools/perf/arch/powerpc/util/kvm-stat.c
tools/perf/arch/x86/tests/intel-cqm.c
tools/perf/arch/x86/tests/perf-time-to-tsc.c
tools/perf/builtin-ftrace.c
tools/perf/builtin-kvm.c
tools/perf/builtin-record.c
tools/perf/builtin-stat.c
tools/perf/builtin-top.c
tools/perf/builtin-trace.c
tools/perf/tests/backward-ring-buffer.c
tools/perf/tests/bpf.c
tools/perf/tests/code-reading.c
tools/perf/tests/event-times.c
tools/perf/tests/evsel-roundtrip-name.c
tools/perf/tests/hists_cumulate.c
tools/perf/tests/hists_filter.c
tools/perf/tests/hists_link.c
tools/perf/tests/hists_output.c
tools/perf/tests/keep-tracking.c
tools/perf/tests/mmap-basic.c
tools/perf/tests/openat-syscall-tp-fields.c
tools/perf/tests/parse-events.c
tools/perf/tests/sw-clock.c
tools/perf/tests/switch-tracking.c
tools/perf/util/evlist.c
tools/perf/util/evlist.h
tools/perf/util/header.c
tools/perf/util/record.c

index 28fc0bab370fd01ad3c565bea768ae1a9bcefdc9..f0dbf7b075c8d86f6bae680e2e43e2b70a0f8aab 100644 (file)
@@ -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 evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
 
        if (evlist == NULL)
                return -ENOMEM;
index 333b2f0d61e46918ad6e6ba427204abe646c3de8..8089a33c6c164781eef8683dd520820816fe0462 100644 (file)
@@ -51,7 +51,7 @@ int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subt
 
        flag = perf_event_open_cloexec_flag();
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (!evlist) {
                pr_debug("perf_evlist__new failed\n");
                return TEST_FAIL;
index d7092fc00e3b5cecf9d3c130434bd1bea65c0fb1..da9a3302d8e64fde99b5f9f5dfb3f34515d56d51 100644 (file)
@@ -68,7 +68,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
        cpus = cpu_map__new(NULL);
        CHECK_NOT_NULL__(cpus);
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        CHECK_NOT_NULL__(evlist);
 
        perf_evlist__set_maps(evlist, cpus, threads);
index 1263987c291aa1fb0496e4a7ade92a62fbd61f82..b8bdc593e5b8fddda6095bffdde1608bc0e5a4cd 100644 (file)
@@ -495,7 +495,7 @@ int cmd_ftrace(int argc, const char **argv)
                goto out_delete_filters;
        }
 
-       ftrace.evlist = perf_evlist__new();
+       ftrace.evlist = evlist__new();
        if (ftrace.evlist == NULL) {
                ret = -ENOMEM;
                goto out_delete_filters;
index 963dddc5853d5a8b7d8ef91f4db3474e12afb347..ee896b8a9fe881747f98893fc78ccc33a8f2af74 100644 (file)
@@ -1290,7 +1290,7 @@ static struct evlist *kvm_live_event_list(void)
        int err = -1;
        const char * const *events_tp;
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (evlist == NULL)
                return NULL;
 
index f08d1e6a16513f76b59eb33f30868c3881f4adfb..e8aa8a078dffb5f4fb75c8d12a44fae352018750 100644 (file)
@@ -2265,7 +2265,7 @@ int cmd_record(int argc, const char **argv)
        CPU_ZERO(&rec->affinity_mask);
        rec->opts.affinity = PERF_AFFINITY_SYS;
 
-       rec->evlist = perf_evlist__new();
+       rec->evlist = evlist__new();
        if (rec->evlist == NULL)
                return -ENOMEM;
 
index 4e61f8a1d22b251df40b4c83f7a9dfe50aeb93f7..ee0dc8088ac080fe0c92c898de8728ca245fc7ff 100644 (file)
@@ -1702,7 +1702,7 @@ int cmd_stat(int argc, const char **argv)
 
        setlocale(LC_ALL, "");
 
-       evsel_list = perf_evlist__new();
+       evsel_list = evlist__new();
        if (evsel_list == NULL)
                return -ENOMEM;
 
index c29fa1de854f229007fe73fcc7b4544783420340..e4b7146cd6660274f341e664fc5ac94ae247f08a 100644 (file)
@@ -1524,7 +1524,7 @@ int cmd_top(int argc, const char **argv)
        top.annotation_opts.min_pcnt = 5;
        top.annotation_opts.context  = 4;
 
-       top.evlist = perf_evlist__new();
+       top.evlist = evlist__new();
        if (top.evlist == NULL)
                return -ENOMEM;
 
index f7e7daac3cbee7e945aa94bc93396bb99c3e9a1e..767b04eaaf451f4992934e495b316f577636388c 100644 (file)
@@ -4169,7 +4169,7 @@ int cmd_trace(int argc, const char **argv)
        signal(SIGSEGV, sighandler_dump_stack);
        signal(SIGFPE, sighandler_dump_stack);
 
-       trace.evlist = perf_evlist__new();
+       trace.evlist = evlist__new();
        trace.sctbl = syscalltbl__new();
 
        if (trace.evlist == NULL || trace.sctbl == NULL) {
index 3f9c931069b04c4bc0f2c55067640f1d0c2ec961..3883b315b25be804f50caa520d1372cb33c89f75 100644 (file)
@@ -99,7 +99,7 @@ int test__backward_ring_buffer(struct test *test __maybe_unused, int subtest __m
        pid[sizeof(pid) - 1] = '\0';
        opts.target.tid = opts.target.pid = pid;
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (!evlist) {
                pr_debug("Not enough memory to create evlist\n");
                return TEST_FAIL;
index 95a15b51f95c4879b27725d3cb3ffffa91ad37b0..d15f62dc426114f1070efb404c9ff88d8d300349 100644 (file)
@@ -140,7 +140,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
        opts.target.tid = opts.target.pid = pid;
 
        /* Instead of perf_evlist__new_default, don't add default events */
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (!evlist) {
                pr_debug("Not enough memory to create evlist\n");
                return TEST_FAIL;
index 168deb9c563e7c70d757fd684ecb7beb144e52b2..dd0325eabc2560246a2eeb7a72ff19ff4b7177cf 100644 (file)
@@ -622,7 +622,7 @@ static int do_test_code_reading(bool try_kcore)
        while (1) {
                const char *str;
 
-               evlist = perf_evlist__new();
+               evlist = evlist__new();
                if (!evlist) {
                        pr_debug("perf_evlist__new failed\n");
                        goto out_put;
index c3545a6efcbc610ae010c7581b87c16c8800e531..8d3cf9792d9e681c8f8195cab7c639c439c8f283 100644 (file)
@@ -166,7 +166,7 @@ static int test_times(int (attach)(struct evlist *),
        struct evsel *evsel;
        int err = -1, i;
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (!evlist) {
                pr_debug("failed to create event list\n");
                goto out_err;
index 6cc408b23026ba5698d823be958c0cbbd596bb6a..74e79d6b7e96e3f5095654eb25a8905c3ff39c02 100644 (file)
@@ -12,7 +12,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
        char name[128];
        int type, op, err = 0, ret = 0, i, idx;
        struct evsel *evsel;
-       struct evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
 
         if (evlist == NULL)
                 return -ENOMEM;
@@ -68,7 +68,7 @@ static int __perf_evsel__name_array_test(const char *names[], int nr_names)
 {
        int i, err;
        struct evsel *evsel;
-       struct evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
 
         if (evlist == NULL)
                 return -ENOMEM;
index d7a6b97683d6fd89527905fdecc73657cce840e6..897e74b5ed1fae9c3954f24984fb05f45a3fd2bd 100644 (file)
@@ -695,7 +695,7 @@ int test__hists_cumulate(struct test *test __maybe_unused, int subtest __maybe_u
        struct machines machines;
        struct machine *machine;
        struct evsel *evsel;
-       struct evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
        size_t i;
        test_fn_t testcases[] = {
                test1,
index 9f0d6af839e91682040c7f7afbfd5254813bfbdd..b0468db74ca37fd3acd24255b4622f2547722081 100644 (file)
@@ -109,7 +109,7 @@ int test__hists_filter(struct test *test __maybe_unused, int subtest __maybe_unu
        struct machines machines;
        struct machine *machine;
        struct evsel *evsel;
-       struct evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
 
        TEST_ASSERT_VAL("No memory", evlist);
 
index 6ab27dd3bf3fbd119ceb19d47dd17b9b405d0e1e..878cb5bfbe785492552dbc6d955b1a645ec6deaa 100644 (file)
@@ -272,7 +272,7 @@ int test__hists_link(struct test *test __maybe_unused, int subtest __maybe_unuse
        struct machines machines;
        struct machine *machine = NULL;
        struct evsel *evsel, *first;
-       struct evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
 
        if (evlist == NULL)
                 return -ENOMEM;
index cd36e51cdf3b7605b96d4504832c269a0da7b7ba..87a05e7afb7e4cbbdef0b241162b519f40a1d5aa 100644 (file)
@@ -581,7 +581,7 @@ int test__hists_output(struct test *test __maybe_unused, int subtest __maybe_unu
        struct machines machines;
        struct machine *machine;
        struct evsel *evsel;
-       struct evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
        size_t i;
        test_fn_t testcases[] = {
                test1,
index e0779f2a340caa710acee09e155c4e9aa9a807b9..4c73377bfccb1090b5540a6c241fd332ec98551f 100644 (file)
@@ -78,7 +78,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
        cpus = cpu_map__new(NULL);
        CHECK_NOT_NULL__(cpus);
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        CHECK_NOT_NULL__(evlist);
 
        perf_evlist__set_maps(evlist, cpus, threads);
index 749b580e9a923b1071f42d6d9409d0370eff1c7a..8d1be34fd951632e31d86c9894925e3a1e531ce8 100644 (file)
@@ -61,7 +61,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
                goto out_free_cpus;
        }
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (evlist == NULL) {
                pr_debug("perf_evlist__new\n");
                goto out_free_cpus;
index 69bf0ec2fe5f1c2a16e2601a956a91ca80da338f..14159243752022da356022e3031c5ff58a01981a 100644 (file)
@@ -32,7 +32,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
        };
        const char *filename = "/etc/passwd";
        int flags = O_RDONLY | O_DIRECTORY;
-       struct evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
        struct evsel *evsel;
        int err = -1, i, nr_events = 0, nr_polls = 0;
        char sbuf[STRERR_BUFSIZE];
index 7409eed11b65eb5e714e2d23541a6f5d58d5b03f..6e81a930b2244df6a16cd621d5fd133f9f65b3c9 100644 (file)
@@ -1777,7 +1777,7 @@ static int test_event(struct evlist_test *e)
                return 0;
        }
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (evlist == NULL)
                return -ENOMEM;
 
index 69b997eeb639f5d919d8da6972308c1a9a57e861..88a75cbae2306e0418aa05e296c80bd4bff148fd 100644 (file)
@@ -43,9 +43,9 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
 
        attr.sample_freq = 500;
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (evlist == NULL) {
-               pr_debug("perf_evlist__new\n");
+               pr_debug("evlist__new\n");
                return -1;
        }
 
index 3e26ea36ec297a8437e3f1a943eabd8bb8f26d0f..89bc20b2178a83595200632081f866cdf5a0999c 100644 (file)
@@ -347,9 +347,9 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
                goto out_err;
        }
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (!evlist) {
-               pr_debug("perf_evlist__new failed!\n");
+               pr_debug("evlist__new failed!\n");
                goto out_err;
        }
 
index 4fcd55c8a8d52a1bf164a947b31097b9dc62691e..317b2d64ba6d93644dac091688a664c497ffa51b 100644 (file)
@@ -55,7 +55,7 @@ void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
        evlist->bkw_mmap_state = BKW_MMAP_NOTREADY;
 }
 
-struct evlist *perf_evlist__new(void)
+struct evlist *evlist__new(void)
 {
        struct evlist *evlist = zalloc(sizeof(*evlist));
 
@@ -67,7 +67,7 @@ struct evlist *perf_evlist__new(void)
 
 struct evlist *perf_evlist__new_default(void)
 {
-       struct evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
 
        if (evlist && perf_evlist__add_default(evlist)) {
                perf_evlist__delete(evlist);
@@ -79,7 +79,7 @@ struct evlist *perf_evlist__new_default(void)
 
 struct evlist *perf_evlist__new_dummy(void)
 {
-       struct evlist *evlist = perf_evlist__new();
+       struct evlist *evlist = evlist__new();
 
        if (evlist && perf_evlist__add_dummy(evlist)) {
                perf_evlist__delete(evlist);
@@ -1839,7 +1839,7 @@ int perf_evlist__add_sb_event(struct evlist **evlist,
        bool new_evlist = (*evlist) == NULL;
 
        if (*evlist == NULL)
-               *evlist = perf_evlist__new();
+               *evlist = evlist__new();
        if (*evlist == NULL)
                return -1;
 
index d6a3fa461566b16434294eb76c7d3dceabf33556..60e1c9268e9e67b3024f56f42c6fa81e731cd0aa 100644 (file)
@@ -65,7 +65,7 @@ struct evsel_str_handler {
        void       *handler;
 };
 
-struct evlist *perf_evlist__new(void);
+struct evlist *evlist__new(void);
 struct evlist *perf_evlist__new_default(void);
 struct evlist *perf_evlist__new_dummy(void);
 void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus,
index 692fe8ac12ae09d174c800af04cd896459ba96ac..5b90786a84369c92d500a40b6ae09a766a4dc62f 100644 (file)
@@ -3535,7 +3535,7 @@ int perf_session__read_header(struct perf_session *session)
        int nr_attrs, nr_ids, i, j;
        int fd = perf_data__fd(data);
 
-       session->evlist = perf_evlist__new();
+       session->evlist = evlist__new();
        if (session->evlist == NULL)
                return -ENOMEM;
 
@@ -4016,7 +4016,7 @@ int perf_event__process_attr(struct perf_tool *tool __maybe_unused,
        struct evlist *evlist = *pevlist;
 
        if (evlist == NULL) {
-               *pevlist = evlist = perf_evlist__new();
+               *pevlist = evlist = evlist__new();
                if (evlist == NULL)
                        return -ENOMEM;
        }
index a550d78a0b4dd76f9648c0061f00b34f27cf341c..a23c69137dfc224d6b4d2158f667a1ef3358e27e 100644 (file)
@@ -19,7 +19,7 @@ static int perf_do_probe_api(setup_probe_fn_t fn, int cpu, const char *str)
        int err = -EAGAIN, fd;
        static pid_t pid = -1;
 
-       evlist = perf_evlist__new();
+       evlist = evlist__new();
        if (!evlist)
                return -ENOMEM;
 
@@ -264,7 +264,7 @@ bool perf_evlist__can_select_event(struct evlist *evlist, const char *str)
        bool ret = false;
        pid_t pid = -1;
 
-       temp_evlist = perf_evlist__new();
+       temp_evlist = evlist__new();
        if (!temp_evlist)
                return false;