mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 06:55:13 +08:00
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>
This commit is contained in:
parent
27c9fcfc1e
commit
68c2504341
@ -934,6 +934,11 @@ void perf_pmu__warn_invalid_formats(struct perf_pmu *pmu)
|
||||
{
|
||||
struct perf_pmu_format *format;
|
||||
|
||||
if (pmu->formats_checked)
|
||||
return;
|
||||
|
||||
pmu->formats_checked = true;
|
||||
|
||||
/* fake pmu doesn't have format list */
|
||||
if (pmu == &perf_pmu__fake)
|
||||
return;
|
||||
|
@ -76,6 +76,11 @@ struct perf_pmu {
|
||||
* specific code.
|
||||
*/
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user