perf evlist: Use the right prefix for 'struct evlist' print methods
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Nov 2020 17:55:12 +0000 (14:55 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Nov 2020 17:55:12 +0000 (14:55 -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-annotate.c
tools/perf/builtin-report.c
tools/perf/builtin-stat.c
tools/perf/util/hist.c
tools/perf/util/hist.h
tools/perf/util/session.c
tools/perf/util/stat-display.c
tools/perf/util/stat.h

index 4940d10074c3ec656a6539ad7f894c07a209bb4c..d6a81a6e1041c2e769a4098e150b1c8f7a58a0cc 100644 (file)
@@ -412,7 +412,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
 
        if (dump_trace) {
                perf_session__fprintf_nr_events(session, stdout);
-               perf_evlist__fprintf_nr_events(session->evlist, stdout);
+               evlist__fprintf_nr_events(session->evlist, stdout);
                goto out;
        }
 
index 11f13aafde440962f0439475770889aad066e29b..0a335bef64d0c3cbdc2042b6f3c08a4db7b74c35 100644 (file)
@@ -928,7 +928,7 @@ static int __cmd_report(struct report *rep)
 
                if (dump_trace) {
                        perf_session__fprintf_nr_events(session, stdout);
-                       perf_evlist__fprintf_nr_events(session->evlist, stdout);
+                       evlist__fprintf_nr_events(session->evlist, stdout);
                        return 0;
                }
        }
index 29f7d4752e8481d3cd66dc58e6fa7cdd4dd1ff74..d69378f135e6b6d7df5580b38f1058be48582c36 100644 (file)
@@ -974,8 +974,7 @@ static void print_counters(struct timespec *ts, int argc, const char **argv)
        if (stat_config.quiet)
                return;
 
-       perf_evlist__print_counters(evsel_list, &stat_config, &target,
-                                   ts, argc, argv);
+       evlist__print_counters(evsel_list, &stat_config, &target, ts, argc, argv);
 }
 
 static volatile int signr = -1;
index 8a793e4c9400a723e228f43a60edcb88f71443e3..7feeaa07c77766fa933693969771540600a221be 100644 (file)
@@ -2654,7 +2654,7 @@ void hist__account_cycles(struct branch_stack *bs, struct addr_location *al,
        }
 }
 
-size_t perf_evlist__fprintf_nr_events(struct evlist *evlist, FILE *fp)
+size_t evlist__fprintf_nr_events(struct evlist *evlist, FILE *fp)
 {
        struct evsel *pos;
        size_t ret = 0;
index 278b49e915b07f1cc1c78292fc715cd4067f48a8..df6c6eea0960567dbdc09d5cfeba29622ef92688 100644 (file)
@@ -196,7 +196,7 @@ void hists__inc_nr_samples(struct hists *hists, bool filtered);
 size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
                      int max_cols, float min_pcnt, FILE *fp,
                      bool ignore_callchains);
-size_t perf_evlist__fprintf_nr_events(struct evlist *evlist, FILE *fp);
+size_t evlist__fprintf_nr_events(struct evlist *evlist, FILE *fp);
 
 void hists__filter_by_dso(struct hists *hists);
 void hists__filter_by_thread(struct hists *hists);
index ce381b3dca066bc84ac44abf5c9b50e8f1f5af7a..6707a01b7ef8d93025998759b66ddeffe7d2fee6 100644 (file)
@@ -1191,9 +1191,7 @@ static void stack_user__printf(struct stack_dump *dump)
               dump->size, dump->offset);
 }
 
-static void perf_evlist__print_tstamp(struct evlist *evlist,
-                                      union perf_event *event,
-                                      struct perf_sample *sample)
+static void evlist__print_tstamp(struct evlist *evlist, union perf_event *event, struct perf_sample *sample)
 {
        u64 sample_type = __evlist__combined_sample_type(evlist);
 
@@ -1254,7 +1252,7 @@ static void dump_event(struct evlist *evlist, union perf_event *event,
                evlist->trace_event_sample_raw(evlist, event, sample);
 
        if (sample)
-               perf_evlist__print_tstamp(evlist, event, sample);
+               evlist__print_tstamp(evlist, event, sample);
 
        printf("%#" PRIx64 " [%#x]: PERF_RECORD_%s", file_offset,
               event->header.size, perf_event__name(event->header.type));
index a963b5b8eb72409152596d6b33f0d961aeb1aa40..fee7543843a8dcdc05672758e047dbc757a385f4 100644 (file)
@@ -1184,12 +1184,8 @@ static void print_percore(struct perf_stat_config *config,
                fputc('\n', output);
 }
 
-void
-perf_evlist__print_counters(struct evlist *evlist,
-                           struct perf_stat_config *config,
-                           struct target *_target,
-                           struct timespec *ts,
-                           int argc, const char **argv)
+void evlist__print_counters(struct evlist *evlist, struct perf_stat_config *config,
+                           struct target *_target, struct timespec *ts, int argc, const char **argv)
 {
        bool metric_only = config->metric_only;
        int interval = config->interval;
index 4cba4b106e45cec5f8b802d270c3c735b0c0ae97..9979b4b100f215423b1c084cf2dbcb862122232e 100644 (file)
@@ -238,12 +238,8 @@ int create_perf_stat_counter(struct evsel *evsel,
                             struct perf_stat_config *config,
                             struct target *target,
                             int cpu);
-void
-perf_evlist__print_counters(struct evlist *evlist,
-                           struct perf_stat_config *config,
-                           struct target *_target,
-                           struct timespec *ts,
-                           int argc, const char **argv);
+void evlist__print_counters(struct evlist *evlist, struct perf_stat_config *config,
+                           struct target *_target, struct timespec *ts, int argc, const char **argv);
 
 struct metric_expr;
 double test_generic_metric(struct metric_expr *mexp, int cpu, struct runtime_stat *st);