Skip to content

Commit e46fc8d

Browse files
committed
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: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 3bf91aa commit e46fc8d

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎tools/perf/util/pmu.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include "strbuf.h"
2727
#include "fncache.h"
2828

29+
struct perf_pmu perf_pmu__fake;
30+
2931
struct perf_pmu_format {
3032
char *name;
3133
int value;

‎tools/perf/util/pmu.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ struct perf_pmu {
4343
struct list_head list; /* ELEM */
4444
};
4545

46+
extern struct perf_pmu perf_pmu__fake;
47+
4648
struct perf_pmu_info {
4749
const char *unit;
4850
const char *metric_expr;

0 commit comments

Comments
 (0)