]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
perf auxtrace: Move perf_evsel__find_pmu()
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 15 Nov 2019 12:42:14 +0000 (14:42 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 22 Nov 2019 13:48:13 +0000 (10:48 -0300)
Move perf_evsel__find_pmu() so it can be used without forward
declaration.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20191115124225.5247-5-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/auxtrace.c

index c555c3ccd79d67eaf8295cbb812c8e11683c9949..263d1d9d89875262d7b32cc72b13496df7126da4 100644 (file)
 #include "symbol/kallsyms.h"
 #include <internal/lib.h>
 
+static struct perf_pmu *perf_evsel__find_pmu(struct evsel *evsel)
+{
+       struct perf_pmu *pmu = NULL;
+
+       while ((pmu = perf_pmu__scan(pmu)) != NULL) {
+               if (pmu->type == evsel->core.attr.type)
+                       break;
+       }
+
+       return pmu;
+}
+
 static bool auxtrace__dont_decode(struct perf_session *session)
 {
        return !session->itrace_synth_opts ||
@@ -2180,18 +2192,6 @@ out_exit:
        return err;
 }
 
-static struct perf_pmu *perf_evsel__find_pmu(struct evsel *evsel)
-{
-       struct perf_pmu *pmu = NULL;
-
-       while ((pmu = perf_pmu__scan(pmu)) != NULL) {
-               if (pmu->type == evsel->core.attr.type)
-                       break;
-       }
-
-       return pmu;
-}
-
 static int perf_evsel__nr_addr_filter(struct evsel *evsel)
 {
        struct perf_pmu *pmu = perf_evsel__find_pmu(evsel);