perf pmu: Add a perf_pmu__fake object to use with __parse_events()

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 3bf91aa5
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include "strbuf.h" #include "strbuf.h"
#include "fncache.h" #include "fncache.h"
struct perf_pmu perf_pmu__fake;
struct perf_pmu_format { struct perf_pmu_format {
char *name; char *name;
int value; int value;
......
...@@ -43,6 +43,8 @@ struct perf_pmu { ...@@ -43,6 +43,8 @@ struct perf_pmu {
struct list_head list; /* ELEM */ struct list_head list; /* ELEM */
}; };
extern struct perf_pmu perf_pmu__fake;
struct perf_pmu_info { struct perf_pmu_info {
const char *unit; const char *unit;
const char *metric_expr; const char *metric_expr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment