perf evlist: Use the right prefix for 'struct evlist' sideband thread methods

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>
This commit is contained in:
Arnaldo Carvalho de Melo 2020-11-30 09:40:10 -03:00
parent 24bf91a754
commit 08c83997ca
5 changed files with 13 additions and 16 deletions

View 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;
}

View 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);

View 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,

View 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);

View 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;