perf evsel: Rename perf_evsel__object_config() to evsel__object_config()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 May 2020 15:55:06 +0000 (12:55 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 28 May 2020 13:03:24 +0000 (10:03 -0300)
As it is a 'struct evsel' method, not part of tools/lib/perf/, aka
libperf, to whom the perf_ prefix belongs.

Cc: Adrian Hunter <adrian.hunter@intel.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/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/hist.c

index f3e60c4..e8ccf90 100644 (file)
@@ -56,14 +56,14 @@ struct perf_missing_features perf_missing_features;
 
 static clockid_t clockid;
 
-static int perf_evsel__no_extra_init(struct evsel *evsel __maybe_unused)
+static int evsel__no_extra_init(struct evsel *evsel __maybe_unused)
 {
        return 0;
 }
 
 void __weak test_attr__ready(void) { }
 
-static void perf_evsel__no_extra_fini(struct evsel *evsel __maybe_unused)
+static void evsel__no_extra_fini(struct evsel *evsel __maybe_unused)
 {
 }
 
@@ -73,13 +73,12 @@ static struct {
        void    (*fini)(struct evsel *evsel);
 } perf_evsel__object = {
        .size = sizeof(struct evsel),
-       .init = perf_evsel__no_extra_init,
-       .fini = perf_evsel__no_extra_fini,
+       .init = evsel__no_extra_init,
+       .fini = evsel__no_extra_fini,
 };
 
-int perf_evsel__object_config(size_t object_size,
-                             int (*init)(struct evsel *evsel),
-                             void (*fini)(struct evsel *evsel))
+int evsel__object_config(size_t object_size, int (*init)(struct evsel *evsel),
+                        void (*fini)(struct evsel *evsel))
 {
 
        if (object_size == 0)
index 351c0aa..9274f55 100644 (file)
@@ -154,9 +154,9 @@ void perf_counts_values__scale(struct perf_counts_values *count,
 void evsel__compute_deltas(struct evsel *evsel, int cpu, int thread,
                           struct perf_counts_values *count);
 
-int perf_evsel__object_config(size_t object_size,
-                             int (*init)(struct evsel *evsel),
-                             void (*fini)(struct evsel *evsel));
+int evsel__object_config(size_t object_size,
+                        int (*init)(struct evsel *evsel),
+                        void (*fini)(struct evsel *evsel));
 
 struct perf_pmu *evsel__find_pmu(struct evsel *evsel);
 bool evsel__is_aux_event(struct evsel *evsel);
index 12b65d0..a7dcd92 100644 (file)
@@ -2845,9 +2845,8 @@ static int hists_evsel__init(struct evsel *evsel)
 
 int hists__init(void)
 {
-       int err = perf_evsel__object_config(sizeof(struct hists_evsel),
-                                           hists_evsel__init,
-                                           hists_evsel__exit);
+       int err = evsel__object_config(sizeof(struct hists_evsel),
+                                      hists_evsel__init, hists_evsel__exit);
        if (err)
                fputs("FATAL ERROR: Couldn't setup hists class\n", stderr);