lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a5b1bb5f-7364-465a-ae32-9dafa0823f1d@linaro.org>
Date: Thu, 20 Nov 2025 14:19:05 +0000
From: James Clark <james.clark@...aro.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>,
 linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
 Thomas Richter <tmricht@...ux.ibm.com>
Subject: Re: [PATCH v1] perf test all metrics: Fully ignore Default metric
 failures



On 19/11/2025 7:30 pm, Ian Rogers wrote:
> Determine if a metric is default from `perf list --raw-dump $m` eg:
> ```
> $ perf list --raw-dump l1_prefetch_miss_rate
> Default4 l1_prefetch_miss_rate
> ```
> If a metric has "not supported" or "no supported events" then ignore
> these failures for default metrics. Tidy up the skip/fail messages in
> the output to make them easier to spot/read.
> 
> Reported-by: Thomas Richter <tmricht@...ux.ibm.com>
> Closes: https://lore.kernel.org/linux-perf-users/20251119104751.51960-1-tmricht@linux.ibm.com/
> Reported-by: Namhyung Kim <namhyung@...nel.org>
> Reported-by: James Clark <james.clark@...aro.org>
> Closes: https://lore.kernel.org/lkml/aRi9xnwdLh3Dir9f@google.com/
> Signed-off-by: Ian Rogers <irogers@...gle.com>

Reviewed-by: James Clark <james.clark@...aro.org>

> ---
>   tools/perf/tests/shell/stat_all_metrics.sh | 27 ++++++++++++++--------
>   1 file changed, 17 insertions(+), 10 deletions(-)
> 
> diff --git a/tools/perf/tests/shell/stat_all_metrics.sh b/tools/perf/tests/shell/stat_all_metrics.sh
> index a7edf01b3943..3dabb39c7cc8 100755
> --- a/tools/perf/tests/shell/stat_all_metrics.sh
> +++ b/tools/perf/tests/shell/stat_all_metrics.sh
> @@ -27,19 +27,20 @@ for m in $(perf list --raw-dump metrics); do
>     fi
>     if [[ "$result" =~ "Cannot resolve IDs for" || "$result" =~ "No supported events found" ]]
>     then
> -    if [[ "$m" == @(l1_prefetch_miss_rate|stalled_cycles_per_instruction) ]]
> +    if [[ $(perf list --raw-dump $m) == "Default"* ]]
>       then
> -      # Default metrics that may use unsupported events.
> +      echo "[Ignored $m] failed but as a Default metric this can be expected"
> +      echo $result
>         continue
>       fi
> -    echo "Metric contains missing events"
> +    echo "[Failed $m] Metric contains missing events"
>       echo $result
>       err=1 # Fail
>       continue
>     elif [[ "$result" =~ \
>           "Access to performance monitoring and observability operations is limited" ]]
>     then
> -    echo "Permission failure"
> +    echo "[Skipped $m] Permission failure"
>       echo $result
>       if [[ $err -eq 0 ]]
>       then
> @@ -48,7 +49,7 @@ for m in $(perf list --raw-dump metrics); do
>       continue
>     elif [[ "$result" =~ "in per-thread mode, enable system wide" ]]
>     then
> -    echo "Permissions - need system wide mode"
> +    echo "[Skipped $m] Permissions - need system wide mode"
>       echo $result
>       if [[ $err -eq 0 ]]
>       then
> @@ -57,7 +58,13 @@ for m in $(perf list --raw-dump metrics); do
>       continue
>     elif [[ "$result" =~ "<not supported>" ]]
>     then
> -    echo "Not supported events"
> +    if [[ $(perf list --raw-dump $m) == "Default"* ]]
> +    then
> +      echo "[Ignored $m] failed but as a Default metric this can be expected"
> +      echo $result
> +      continue
> +    fi
> +    echo "[Skipped $m] Not supported events"
>       echo $result
>       if [[ $err -eq 0 ]]
>       then
> @@ -66,7 +73,7 @@ for m in $(perf list --raw-dump metrics); do
>       continue
>     elif [[ "$result" =~ "<not counted>" ]]
>     then
> -    echo "Not counted events"
> +    echo "[Skipped $m] Not counted events"
>       echo $result
>       if [[ $err -eq 0 ]]
>       then
> @@ -75,7 +82,7 @@ for m in $(perf list --raw-dump metrics); do
>       continue
>     elif [[ "$result" =~ "FP_ARITH" || "$result" =~ "AMX" ]]
>     then
> -    echo "FP issues"
> +    echo "[Skipped $m] FP issues"
>       echo $result
>       if [[ $err -eq 0 ]]
>       then
> @@ -84,7 +91,7 @@ for m in $(perf list --raw-dump metrics); do
>       continue
>     elif [[ "$result" =~ "PMM" ]]
>     then
> -    echo "Optane memory issues"
> +    echo "[Skipped $m] Optane memory issues"
>       echo $result
>       if [[ $err -eq 0 ]]
>       then
> @@ -101,7 +108,7 @@ for m in $(perf list --raw-dump metrics); do
>       # No error result and metric shown.
>       continue
>     fi
> -  echo "Metric '$m' has non-zero error '$result_err' or not printed in:"
> +  echo "[Failed $m] has non-zero error '$result_err' or not printed in:"
>     echo "$result"
>     err=1
>   done


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ