perf evlist: Use the right prefix for 'struct evlist' sideband thread methods
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Nov 2020 12:40:10 +0000 (09:40 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Nov 2020 12:40:10 +0000 (09:40 -0300)
perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/,
go on completing this split.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-record.c
tools/perf/builtin-top.c
tools/perf/util/bpf-event.c
tools/perf/util/evlist.h
tools/perf/util/sideband_evlist.c

index d533964..04946bd 100644 (file)
@@ -1548,7 +1548,7 @@ static int record__setup_sb_evlist(struct record *rec)
                }
        }
 #endif
-       if (perf_evlist__start_sb_thread(rec->sb_evlist, &rec->opts.target)) {
+       if (evlist__start_sb_thread(rec->sb_evlist, &rec->opts.target)) {
                pr_debug("Couldn't start the BPF side band thread:\nBPF programs starting from now on won't be annotatable\n");
                opts->no_bpf_event = true;
        }
@@ -2065,7 +2065,7 @@ out_delete_session:
        perf_session__delete(session);
 
        if (!opts->no_bpf_event)
-               perf_evlist__stop_sb_thread(rec->sb_evlist);
+               evlist__stop_sb_thread(rec->sb_evlist);
        return status;
 }
 
index b7da093..50dd42d 100644 (file)
@@ -1762,7 +1762,7 @@ int cmd_top(int argc, const char **argv)
        }
 #endif
 
-       if (perf_evlist__start_sb_thread(top.sb_evlist, target)) {
+       if (evlist__start_sb_thread(top.sb_evlist, target)) {
                pr_debug("Couldn't start the BPF side band thread:\nBPF programs starting from now on won't be annotatable\n");
                opts->no_bpf_event = true;
        }
@@ -1770,7 +1770,7 @@ int cmd_top(int argc, const char **argv)
        status = __cmd_top(&top);
 
        if (!opts->no_bpf_event)
-               perf_evlist__stop_sb_thread(top.sb_evlist);
+               evlist__stop_sb_thread(top.sb_evlist);
 
 out_delete_evlist:
        evlist__delete(top.evlist);
index 3742511..57d58c8 100644 (file)
@@ -526,7 +526,7 @@ int evlist__add_bpf_sb_event(struct evlist *evlist, struct perf_env *env)
         */
        attr.wakeup_watermark = 1;
 
-       return perf_evlist__add_sb_event(evlist, &attr, bpf_event__sb_cb, env);
+       return evlist__add_sb_event(evlist, &attr, bpf_event__sb_cb, env);
 }
 
 void bpf_event__print_bpf_prog_info(struct bpf_prog_info *info,
index 3b1acf7..736cb63 100644 (file)
@@ -112,14 +112,11 @@ int __evlist__add_default_attrs(struct evlist *evlist,
 
 int evlist__add_dummy(struct evlist *evlist);
 
-int perf_evlist__add_sb_event(struct evlist *evlist,
-                             struct perf_event_attr *attr,
-                             evsel__sb_cb_t cb,
-                             void *data);
+int evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr,
+                        evsel__sb_cb_t cb, void *data);
 void evlist__set_cb(struct evlist *evlist, evsel__sb_cb_t cb, void *data);
-int perf_evlist__start_sb_thread(struct evlist *evlist,
-                                struct target *target);
-void perf_evlist__stop_sb_thread(struct evlist *evlist);
+int evlist__start_sb_thread(struct evlist *evlist, struct target *target);
+void evlist__stop_sb_thread(struct evlist *evlist);
 
 int evlist__add_newtp(struct evlist *evlist, const char *sys, const char *name, void *handler);
 
index ded9ced..90ed016 100644 (file)
@@ -12,8 +12,8 @@
 #include <sched.h>
 #include <stdbool.h>
 
-int perf_evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr,
-                             evsel__sb_cb_t cb, void *data)
+int evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr,
+                        evsel__sb_cb_t cb, void *data)
 {
        struct evsel *evsel;
 
@@ -94,7 +94,7 @@ void evlist__set_cb(struct evlist *evlist, evsel__sb_cb_t cb, void *data)
       }
 }
 
-int perf_evlist__start_sb_thread(struct evlist *evlist, struct target *target)
+int evlist__start_sb_thread(struct evlist *evlist, struct target *target)
 {
        struct evsel *counter;
 
@@ -138,7 +138,7 @@ out_delete_evlist:
        return -1;
 }
 
-void perf_evlist__stop_sb_thread(struct evlist *evlist)
+void evlist__stop_sb_thread(struct evlist *evlist)
 {
        if (!evlist)
                return;