perf evlist: Use the right prefix for 'struct evlist' browser methods
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Nov 2020 17:23:35 +0000 (14:23 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Nov 2020 17:23:35 +0000 (14:23 -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-report.c
tools/perf/builtin-top.c
tools/perf/ui/browsers/hists.c
tools/perf/ui/gtk/gtk.h
tools/perf/ui/gtk/hists.c
tools/perf/util/hist.h

index 3c74c9c..11f13aa 100644 (file)
@@ -493,8 +493,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
        return ret + fprintf(fp, "\n#\n");
 }
 
-static int perf_evlist__tui_block_hists_browse(struct evlist *evlist,
-                                              struct report *rep)
+static int evlist__tui_block_hists_browse(struct evlist *evlist, struct report *rep)
 {
        struct evsel *pos;
        int i = 0, ret;
@@ -511,9 +510,7 @@ static int perf_evlist__tui_block_hists_browse(struct evlist *evlist,
        return 0;
 }
 
-static int perf_evlist__tty_browse_hists(struct evlist *evlist,
-                                        struct report *rep,
-                                        const char *help)
+static int evlist__tty_browse_hists(struct evlist *evlist, struct report *rep, const char *help)
 {
        struct evsel *pos;
        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,
                            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) {
                ui__error("GTK browser not found!\n");
@@ -622,14 +619,12 @@ static int report__browse_hists(struct report *rep)
        switch (use_browser) {
        case 1:
                if (rep->total_cycles_mode) {
-                       ret = perf_evlist__tui_block_hists_browse(evlist, rep);
+                       ret = evlist__tui_block_hists_browse(evlist, rep);
                        break;
                }
 
-               ret = perf_evlist__tui_browse_hists(evlist, help, NULL,
-                                                   rep->min_percent,
-                                                   &session->header.env,
-                                                   true, &rep->annotation_opts);
+               ret = evlist__tui_browse_hists(evlist, help, NULL, rep->min_percent,
+                                              &session->header.env, true, &rep->annotation_opts);
                /*
                 * Usually "ret" is the last pressed key, and we only
                 * 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);
                break;
        default:
-               ret = perf_evlist__tty_browse_hists(evlist, rep, help);
+               ret = evlist__tty_browse_hists(evlist, rep, help);
                break;
        }
 
index 88bd1ac..5601a35 100644 (file)
@@ -641,12 +641,9 @@ repeat:
                hists->uid_filter_str = top->record_opts.target.uid_str;
        }
 
-       ret = perf_evlist__tui_browse_hists(top->evlist, help, &hbt,
-                                     top->min_percent,
-                                     &top->session->header.env,
-                                     !top->record_opts.overwrite,
-                                     &top->annotation_opts);
-
+       ret = evlist__tui_browse_hists(top->evlist, help, &hbt, top->min_percent,
+                                      &top->session->header.env, !top->record_opts.overwrite,
+                                      &top->annotation_opts);
        if (ret == K_RELOAD) {
                top->zero = true;
                goto repeat;
index 48814ef..2f3ce50 100644 (file)
@@ -3559,13 +3559,9 @@ static bool filter_group_entries(struct ui_browser *browser __maybe_unused,
        return false;
 }
 
-static int __perf_evlist__tui_browse_hists(struct evlist *evlist,
-                                          int nr_entries, const char *help,
-                                          struct hist_browser_timer *hbt,
-                                          float min_pcnt,
-                                          struct perf_env *env,
-                                          bool warn_lost_event,
-                                          struct annotation_options *annotation_opts)
+static int __evlist__tui_browse_hists(struct evlist *evlist, int nr_entries, const char *help,
+                                     struct hist_browser_timer *hbt, float min_pcnt, struct perf_env *env,
+                                     bool warn_lost_event, struct annotation_options *annotation_opts)
 {
        struct evsel *pos;
        struct evsel_menu menu = {
@@ -3614,12 +3610,9 @@ static bool perf_evlist__single_entry(struct evlist *evlist)
        return false;
 }
 
-int perf_evlist__tui_browse_hists(struct evlist *evlist, const char *help,
-                                 struct hist_browser_timer *hbt,
-                                 float min_pcnt,
-                                 struct perf_env *env,
-                                 bool warn_lost_event,
-                                 struct annotation_options *annotation_opts)
+int evlist__tui_browse_hists(struct evlist *evlist, const char *help, struct hist_browser_timer *hbt,
+                            float min_pcnt, struct perf_env *env, bool warn_lost_event,
+                            struct annotation_options *annotation_opts)
 {
        int nr_entries = evlist->core.nr_entries;
 
@@ -3645,10 +3638,8 @@ single_entry: {
                        goto single_entry;
        }
 
-       return __perf_evlist__tui_browse_hists(evlist, nr_entries, help,
-                                              hbt, min_pcnt, env,
-                                              warn_lost_event,
-                                              annotation_opts);
+       return __evlist__tui_browse_hists(evlist, nr_entries, help, hbt, min_pcnt, env,
+                                         warn_lost_event, annotation_opts);
 }
 
 static int block_hists_browser__title(struct hist_browser *browser, char *bf,
index a956393..a2b497f 100644 (file)
@@ -57,9 +57,8 @@ struct evlist;
 struct hist_entry;
 struct hist_browser_timer;
 
-int perf_evlist__gtk_browse_hists(struct evlist *evlist, const char *help,
-                                 struct hist_browser_timer *hbt,
-                                 float min_pcnt);
+int evlist__gtk_browse_hists(struct evlist *evlist, const char *help,
+                            struct hist_browser_timer *hbt, float min_pcnt);
 int hist_entry__gtk_annotate(struct hist_entry *he,
                             struct evsel *evsel,
                             struct hist_browser_timer *hbt);
index 53ef71a..c83be2d 100644 (file)
@@ -590,10 +590,8 @@ static void perf_gtk__show_hierarchy(GtkWidget *window, struct hists *hists,
        gtk_container_add(GTK_CONTAINER(window), view);
 }
 
-int perf_evlist__gtk_browse_hists(struct evlist *evlist,
-                                 const char *help,
-                                 struct hist_browser_timer *hbt __maybe_unused,
-                                 float min_pcnt)
+int evlist__gtk_browse_hists(struct evlist *evlist, const char *help,
+                            struct hist_browser_timer *hbt __maybe_unused, float min_pcnt)
 {
        struct evsel *pos;
        GtkWidget *vbox;
index 96b1c13..278b49e 100644 (file)
@@ -464,12 +464,9 @@ int hist_entry__tui_annotate(struct hist_entry *he, struct evsel *evsel,
                             struct hist_browser_timer *hbt,
                             struct annotation_options *annotation_opts);
 
-int perf_evlist__tui_browse_hists(struct evlist *evlist, const char *help,
-                                 struct hist_browser_timer *hbt,
-                                 float min_pcnt,
-                                 struct perf_env *env,
-                                 bool warn_lost_event,
-                                 struct annotation_options *annotation_options);
+int evlist__tui_browse_hists(struct evlist *evlist, const char *help, struct hist_browser_timer *hbt,
+                            float min_pcnt, struct perf_env *env, bool warn_lost_event,
+                            struct annotation_options *annotation_options);
 
 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);
 #else
 static inline
-int perf_evlist__tui_browse_hists(struct evlist *evlist __maybe_unused,
-                                 const char *help __maybe_unused,
-                                 struct hist_browser_timer *hbt __maybe_unused,
-                                 float min_pcnt __maybe_unused,
-                                 struct perf_env *env __maybe_unused,
-                                 bool warn_lost_event __maybe_unused,
-                                 struct annotation_options *annotation_options __maybe_unused)
+int evlist__tui_browse_hists(struct evlist *evlist __maybe_unused,
+                            const char *help __maybe_unused,
+                            struct hist_browser_timer *hbt __maybe_unused,
+                            float min_pcnt __maybe_unused,
+                            struct perf_env *env __maybe_unused,
+                            bool warn_lost_event __maybe_unused,
+                            struct annotation_options *annotation_options __maybe_unused)
 {
        return 0;
 }