]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf arm-spe: Don't warn about the discard bit if it doesn't exist
authorJames Clark <james.clark@linaro.org>
Fri, 10 Apr 2026 11:05:12 +0000 (12:05 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 30 May 2026 00:20:50 +0000 (21:20 -0300)
commit83eff458a690e650b68cd6467aae8959755c5388
tree7cba219138ac4dc740b6963bfd7f6a0fdd67a6d1
parent167bef4df68635f8bfa2af9108351ee78536d7fb
perf arm-spe: Don't warn about the discard bit if it doesn't exist

Opening an SPE event shows a warning that doesn't concern the user:

  $ perf record -e arm_spe
  Unknown/empty format name: discard

Perf only wants to know if the discard bit is set for configuring the
event, not in response to anything the user has done. Fix it by adding
another helper that returns if a config bit exists without warning.

We should probably keep the warning in evsel__get_config_val() to avoid
having every caller having to do it, and most format bits should never
be missing.

Add a test for the new helper. Rename the parent test function to be
more generic rather than adding a new one as it requires a lot of
boilerplate.

Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/arm64/util/arm-spe.c
tools/perf/tests/pmu.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h