Skip to content
Commit b77f8c36 authored by Yeo Reum Yun's avatar Yeo Reum Yun Committed by Namhyung Kim
Browse files

perf stat: Stop repeating when ref_perf_stat() returns -1



Exit when run_perf_stat() returns an error to avoid continuously
repeating the same error message. It's not expected that COUNTER_FATAL
or internal errors are recoverable so there's no point in retrying.

This fixes the following flood of error messages for permission issues,
for example when perf_event_paranoid==3:
  perf stat -r 1044 -- false

  Error:
  Access to performance monitoring and observability operations is limited.
  ...
  Error:
  Access to performance monitoring and observability operations is limited.
  ...
  (repeating for 1044 times).

Signed-off-by: Yeo Reum Yun's avatarLevi Yun <yeoreum.yun@arm.com>
Reviewed-by: james-c-linaro's avatarJames Clark <james.clark@linaro.org>
Cc: nd@arm.com
Cc: howardchu95@gmail.com
Link: https://lore.kernel.org/r/20240925132022.2650180-3-yeoreum.yun@arm.com


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent e880a70f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment