From: TAKANO Mitsuhiro <takano32@gmail.com>
To: linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
TAKANO Mitsuhiro <takano32@gmail.com>
Subject: [PATCH] perf test: Skip the extra metric line for stalled_cycles_per_instruction
Date: Thu, 22 Oct 2026 02:49:50 +0000 [thread overview]
Message-ID: <20261022024950.264235-1-takano32@gmail.com> (raw)
The STD output linter maps one metric to each default event and stops at
the first line that shows a different one. stalled_cycles_per_instruction
is computed as max(stalled-cycles-frontend, stalled-cycles-backend) /
instructions, so its event set differs from the one behind
backend_cycles_idle and perf stat prints it on a line of its own: a
second stalled-cycles-backend line carrying that metric. The linter
rejects it with "wrong event metric. expected backend_cycles_idle in
...".
Metrics printed on their own line are already skipped
(skip_metric=("tma_" "TopdownL1")); add this one to that list.
Verified on an Ampere Altra (arm64, Neoverse-N1): `perf test "perf stat
STD output linter"` fails before the change and passes after it. Only
the linter is changed; the perf stat output is untouched.
Fixes: c7adeb0974f1 ("perf jevents: Add set of common metrics based on default ones")
Assisted-by: LLM
Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
---
tools/perf/tests/shell/stat+std_output.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/stat+std_output.sh b/tools/perf/tests/shell/stat+std_output.sh
index 9c4b92ecf448..d9610f2c92a6 100755
--- a/tools/perf/tests/shell/stat+std_output.sh
+++ b/tools/perf/tests/shell/stat+std_output.sh
@@ -13,7 +13,7 @@ stat_output=$(mktemp /tmp/__perf_test.stat_output.std.XXXXX)
event_name=(cpu-clock task-clock context-switches cpu-migrations page-faults stalled-cycles-frontend stalled-cycles-backend cycles instructions branches branch-misses)
event_metric=("CPUs_utilized" "CPUs_utilized" "cs/sec" "migrations/sec" "faults/sec" "frontend_cycles_idle" "backend_cycles_idle" "GHz" "insn_per_cycle" "/sec" "branch_miss_rate")
-skip_metric=("tma_" "TopdownL1")
+skip_metric=("tma_" "TopdownL1" "stalled_cycles_per_instruction")
cleanup() {
rm -f "${stat_output}"
base-commit: f47d223627f80cb7a1eb14c585fe6cb35de5e984
--
2.53.0
next reply other threads:[~2026-10-22 2:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 2:49 TAKANO Mitsuhiro [this message]
2026-10-22 2:58 ` [PATCH] perf test: Skip the extra metric line for stalled_cycles_per_instruction sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261022024950.264235-1-takano32@gmail.com \
--to=takano32@gmail.com \
--cc=acme@kernel.org \
--cc=irogers@google.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox