summaryrefslogtreecommitdiff
path: root/tools/perf/util/pmu.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2023-06-01 05:36:43 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-06-01 23:20:19 +0300
commit68c250434125f94dddcff7e9faf392fa96773ac3 (patch)
tree10f847caad6a84f9c24f492856c40314cbc55714 /tools/perf/util/pmu.h
parent27c9fcfc1e14ca9dff930d55cadd8ee4a34e4321 (diff)
downloadlinux-68c250434125f94dddcff7e9faf392fa96773ac3.tar.xz
perf pmu: Only warn about unsupported formats once
Avoid scanning format list for each event parsed. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rob Herring <robh@kernel.org> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com> Link: https://lore.kernel.org/r/20230601023644.587584-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/pmu.h')
-rw-r--r--tools/perf/util/pmu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 13a9a893e665..c21872c0f328 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -77,6 +77,11 @@ struct perf_pmu {
*/
bool auxtrace;
/**
+ * @formats_checked: Only check PMU's formats are valid for
+ * perf_event_attr once.
+ */
+ bool formats_checked;
+ /**
* @max_precise: Number of levels of :ppp precision supported by the
* PMU, read from
* <sysfs>/bus/event_source/devices/<name>/caps/max_precise.