mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
perf evlist: Use the right prefix for 'struct evlist' browser 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:
parent
3ccf8a7b66
commit
f4bd0b4a9b
@ -493,8 +493,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
|
|||||||
return ret + fprintf(fp, "\n#\n");
|
return ret + fprintf(fp, "\n#\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int perf_evlist__tui_block_hists_browse(struct evlist *evlist,
|
static int evlist__tui_block_hists_browse(struct evlist *evlist, struct report *rep)
|
||||||
struct report *rep)
|
|
||||||
{
|
{
|
||||||
struct evsel *pos;
|
struct evsel *pos;
|
||||||
int i = 0, ret;
|
int i = 0, ret;
|
||||||
@ -511,9 +510,7 @@ static int perf_evlist__tui_block_hists_browse(struct evlist *evlist,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int perf_evlist__tty_browse_hists(struct evlist *evlist,
|
static int evlist__tty_browse_hists(struct evlist *evlist, struct report *rep, const char *help)
|
||||||
struct report *rep,
|
|
||||||
const char *help)
|
|
||||||
{
|
{
|
||||||
struct evsel *pos;
|
struct evsel *pos;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -595,7 +592,7 @@ static int report__gtk_browse_hists(struct report *rep, const char *help)
|
|||||||
int (*hist_browser)(struct evlist *evlist, const char *help,
|
int (*hist_browser)(struct evlist *evlist, const char *help,
|
||||||
struct hist_browser_timer *timer, float min_pcnt);
|
struct hist_browser_timer *timer, float min_pcnt);
|
||||||
|
|
||||||
hist_browser = dlsym(perf_gtk_handle, "perf_evlist__gtk_browse_hists");
|
hist_browser = dlsym(perf_gtk_handle, "evlist__gtk_browse_hists");
|
||||||
|
|
||||||
if (hist_browser == NULL) {
|
if (hist_browser == NULL) {
|
||||||
ui__error("GTK browser not found!\n");
|
ui__error("GTK browser not found!\n");
|
||||||
@ -622,14 +619,12 @@ static int report__browse_hists(struct report *rep)
|
|||||||
switch (use_browser) {
|
switch (use_browser) {
|
||||||
case 1:
|
case 1:
|
||||||
if (rep->total_cycles_mode) {
|
if (rep->total_cycles_mode) {
|
||||||
ret = perf_evlist__tui_block_hists_browse(evlist, rep);
|
ret = evlist__tui_block_hists_browse(evlist, rep);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = perf_evlist__tui_browse_hists(evlist, help, NULL,
|
ret = evlist__tui_browse_hists(evlist, help, NULL, rep->min_percent,
|
||||||
rep->min_percent,
|
&session->header.env, true, &rep->annotation_opts);
|
||||||
&session->header.env,
|
|
||||||
true, &rep->annotation_opts);
|
|
||||||
/*
|
/*
|
||||||
* Usually "ret" is the last pressed key, and we only
|
* Usually "ret" is the last pressed key, and we only
|
||||||
* care if the key notifies us to switch data file.
|
* care if the key notifies us to switch data file.
|
||||||
@ -641,7 +636,7 @@ static int report__browse_hists(struct report *rep)
|
|||||||
ret = report__gtk_browse_hists(rep, help);
|
ret = report__gtk_browse_hists(rep, help);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = perf_evlist__tty_browse_hists(evlist, rep, help);
|
ret = evlist__tty_browse_hists(evlist, rep, help);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,12 +641,9 @@ static void *display_thread_tui(void *arg)
|
|||||||
hists->uid_filter_str = top->record_opts.target.uid_str;
|
hists->uid_filter_str = top->record_opts.target.uid_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = perf_evlist__tui_browse_hists(top->evlist, help, &hbt,
|
ret = evlist__tui_browse_hists(top->evlist, help, &hbt, top->min_percent,
|
||||||
top->min_percent,
|
&top->session->header.env, !top->record_opts.overwrite,
|
||||||
&top->session->header.env,
|
&top->annotation_opts);
|
||||||
!top->record_opts.overwrite,
|
|
||||||
&top->annotation_opts);
|
|
||||||
|
|
||||||
if (ret == K_RELOAD) {
|
if (ret == K_RELOAD) {
|
||||||
top->zero = true;
|
top->zero = true;
|
||||||
goto repeat;
|
goto repeat;
|
||||||
|
@ -3559,13 +3559,9 @@ static bool filter_group_entries(struct ui_browser *browser __maybe_unused,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __perf_evlist__tui_browse_hists(struct evlist *evlist,
|
static int __evlist__tui_browse_hists(struct evlist *evlist, int nr_entries, const char *help,
|
||||||
int nr_entries, const char *help,
|
struct hist_browser_timer *hbt, float min_pcnt, struct perf_env *env,
|
||||||
struct hist_browser_timer *hbt,
|
bool warn_lost_event, struct annotation_options *annotation_opts)
|
||||||
float min_pcnt,
|
|
||||||
struct perf_env *env,
|
|
||||||
bool warn_lost_event,
|
|
||||||
struct annotation_options *annotation_opts)
|
|
||||||
{
|
{
|
||||||
struct evsel *pos;
|
struct evsel *pos;
|
||||||
struct evsel_menu menu = {
|
struct evsel_menu menu = {
|
||||||
@ -3614,12 +3610,9 @@ static bool perf_evlist__single_entry(struct evlist *evlist)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int perf_evlist__tui_browse_hists(struct evlist *evlist, const char *help,
|
int evlist__tui_browse_hists(struct evlist *evlist, const char *help, struct hist_browser_timer *hbt,
|
||||||
struct hist_browser_timer *hbt,
|
float min_pcnt, struct perf_env *env, bool warn_lost_event,
|
||||||
float min_pcnt,
|
struct annotation_options *annotation_opts)
|
||||||
struct perf_env *env,
|
|
||||||
bool warn_lost_event,
|
|
||||||
struct annotation_options *annotation_opts)
|
|
||||||
{
|
{
|
||||||
int nr_entries = evlist->core.nr_entries;
|
int nr_entries = evlist->core.nr_entries;
|
||||||
|
|
||||||
@ -3645,10 +3638,8 @@ single_entry: {
|
|||||||
goto single_entry;
|
goto single_entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
return __perf_evlist__tui_browse_hists(evlist, nr_entries, help,
|
return __evlist__tui_browse_hists(evlist, nr_entries, help, hbt, min_pcnt, env,
|
||||||
hbt, min_pcnt, env,
|
warn_lost_event, annotation_opts);
|
||||||
warn_lost_event,
|
|
||||||
annotation_opts);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int block_hists_browser__title(struct hist_browser *browser, char *bf,
|
static int block_hists_browser__title(struct hist_browser *browser, char *bf,
|
||||||
|
@ -57,9 +57,8 @@ struct evlist;
|
|||||||
struct hist_entry;
|
struct hist_entry;
|
||||||
struct hist_browser_timer;
|
struct hist_browser_timer;
|
||||||
|
|
||||||
int perf_evlist__gtk_browse_hists(struct evlist *evlist, const char *help,
|
int evlist__gtk_browse_hists(struct evlist *evlist, const char *help,
|
||||||
struct hist_browser_timer *hbt,
|
struct hist_browser_timer *hbt, float min_pcnt);
|
||||||
float min_pcnt);
|
|
||||||
int hist_entry__gtk_annotate(struct hist_entry *he,
|
int hist_entry__gtk_annotate(struct hist_entry *he,
|
||||||
struct evsel *evsel,
|
struct evsel *evsel,
|
||||||
struct hist_browser_timer *hbt);
|
struct hist_browser_timer *hbt);
|
||||||
|
@ -590,10 +590,8 @@ static void perf_gtk__show_hierarchy(GtkWidget *window, struct hists *hists,
|
|||||||
gtk_container_add(GTK_CONTAINER(window), view);
|
gtk_container_add(GTK_CONTAINER(window), view);
|
||||||
}
|
}
|
||||||
|
|
||||||
int perf_evlist__gtk_browse_hists(struct evlist *evlist,
|
int evlist__gtk_browse_hists(struct evlist *evlist, const char *help,
|
||||||
const char *help,
|
struct hist_browser_timer *hbt __maybe_unused, float min_pcnt)
|
||||||
struct hist_browser_timer *hbt __maybe_unused,
|
|
||||||
float min_pcnt)
|
|
||||||
{
|
{
|
||||||
struct evsel *pos;
|
struct evsel *pos;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
|
@ -464,12 +464,9 @@ int hist_entry__tui_annotate(struct hist_entry *he, struct evsel *evsel,
|
|||||||
struct hist_browser_timer *hbt,
|
struct hist_browser_timer *hbt,
|
||||||
struct annotation_options *annotation_opts);
|
struct annotation_options *annotation_opts);
|
||||||
|
|
||||||
int perf_evlist__tui_browse_hists(struct evlist *evlist, const char *help,
|
int evlist__tui_browse_hists(struct evlist *evlist, const char *help, struct hist_browser_timer *hbt,
|
||||||
struct hist_browser_timer *hbt,
|
float min_pcnt, struct perf_env *env, bool warn_lost_event,
|
||||||
float min_pcnt,
|
struct annotation_options *annotation_options);
|
||||||
struct perf_env *env,
|
|
||||||
bool warn_lost_event,
|
|
||||||
struct annotation_options *annotation_options);
|
|
||||||
|
|
||||||
int script_browse(const char *script_opt, struct evsel *evsel);
|
int script_browse(const char *script_opt, struct evsel *evsel);
|
||||||
|
|
||||||
@ -483,13 +480,13 @@ int block_hists_tui_browse(struct block_hist *bh, struct evsel *evsel,
|
|||||||
struct annotation_options *annotation_opts);
|
struct annotation_options *annotation_opts);
|
||||||
#else
|
#else
|
||||||
static inline
|
static inline
|
||||||
int perf_evlist__tui_browse_hists(struct evlist *evlist __maybe_unused,
|
int evlist__tui_browse_hists(struct evlist *evlist __maybe_unused,
|
||||||
const char *help __maybe_unused,
|
const char *help __maybe_unused,
|
||||||
struct hist_browser_timer *hbt __maybe_unused,
|
struct hist_browser_timer *hbt __maybe_unused,
|
||||||
float min_pcnt __maybe_unused,
|
float min_pcnt __maybe_unused,
|
||||||
struct perf_env *env __maybe_unused,
|
struct perf_env *env __maybe_unused,
|
||||||
bool warn_lost_event __maybe_unused,
|
bool warn_lost_event __maybe_unused,
|
||||||
struct annotation_options *annotation_options __maybe_unused)
|
struct annotation_options *annotation_options __maybe_unused)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user