perf pmu: Add a perf_pmu__fake object to use with __parse_events()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Jun 2020 16:23:24 +0000 (13:23 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 22 Jun 2020 19:28:08 +0000 (16:28 -0300)
When wanting to use the support in __parse_events() for fake pmus, just
pass it.

Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/pmu.c
tools/perf/util/pmu.h

index 93fe72a..6d51042 100644 (file)
@@ -26,6 +26,8 @@
 #include "strbuf.h"
 #include "fncache.h"
 
+struct perf_pmu perf_pmu__fake;
+
 struct perf_pmu_format {
        char *name;
        int value;
index f971d9a..44ccbdb 100644 (file)
@@ -43,6 +43,8 @@ struct perf_pmu {
        struct list_head list;    /* ELEM */
 };
 
+extern struct perf_pmu perf_pmu__fake;
+
 struct perf_pmu_info {
        const char *unit;
        const char *metric_expr;