From: sashiko-bot@kernel.org
To: "Aaron Tomlin" <atomlin@atomlin.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH perf-tools-next v4 4/4] perf tests: Add shell test for kernel symbol beautifier
Date: Fri, 21 Aug 2026 21:01:55 +0000 [thread overview]
Message-ID: <20260821210155.E243F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260821204930.679027-5-atomlin@atomlin.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The test script erroneously fails on uniprocessor (UP) kernels due to a missing SMP-only tracepoint.
- [Medium] The test script can hang the test suite indefinitely on quiescent systems due to unbounded system-wide waits.
--
--- Patch [4]: [PATCH perf-tools-next v4 4/4] perf tests: Add shell test for kernel symbol beautifier ---
commit c9c4a1b0dcd918dc4702b41032200c74d4363a15
Author: Aaron Tomlin <atomlin@atomlin.com>
perf tests: Add shell test for kernel symbol beautifier
This commit adds a dedicated shell test script to verify that perf trace
properly symbolises kernel virtual addresses and function pointers using
both the default kallsyms beautifier and BTF type routing.
> diff --git a/tools/perf/tests/shell/trace_ksym_beautifier.sh b/tools/perf/tests/shell/trace_ksym_beautifier.sh
> new file mode 100755
> index 0000000000000..c030b03e2b662
> --- /dev/null
> +++ b/tools/perf/tests/shell/trace_ksym_beautifier.sh
> @@ -0,0 +1,43 @@
[ ... ]
> +test_ksym_kallsyms() {
> + echo "Testing perf trace kernel symbol beautifier (default kallsyms)"
> + output="$(perf trace -e kmem:kmalloc --max-events=1 2>&1)"
[Severity: Medium]
Could this wait indefinitely on a completely quiescent system?
Because it waits system-wide for the kmem:kmalloc event without a timeout or
a deterministic workload to trigger it, it might stall the test suite if the
event takes too long to fire.
> + if ! echo "$output" | grep -q -E "call_site: [a-zA-Z_][a-zA-Z0-9_]*" || echo "$output" | grep -q -E "call_site: 0x[0-9a-fA-F]+"
> + then
> + printf "Default kallsyms function symbolization failed, output:\n%s\n" "$output"
> + err=1
> + fi
> +}
> +
> +test_ksym_btf() {
> + echo "Testing perf trace kernel symbol beautifier (BTF)"
> + if [ ! -f /sys/kernel/btf/vmlinux ]; then
> + echo "Skipping BTF test due to missing vmlinux BTF"
> + return
> + fi
> +
> + output="$(perf trace -e csd:csd_function_entry --force-btf --max-events=1 2>&1)"
[Severity: Medium]
Will this test fail erroneously on uniprocessor (UP) kernels?
The csd:csd_function_entry tracepoint is defined in kernel/smp.c, which is
only available when CONFIG_SMP is enabled. On a UP kernel, perf trace will
fail with an unknown tracepoint error, which the script would parse as a
symbolization failure.
[Severity: Medium]
Additionally, can this cause an indefinite hang on idle SMP systems?
The csd:csd_function_entry event relies on SMP cross-calls (IPIs). On an idle
or isolated test VM, this event might not occur organically for extended
periods, potentially causing perf trace to block forever without a timeout or
a triggering workload.
> + if ! echo "$output" | grep -q -E "func: [a-zA-Z_][a-zA-Z0-9_]*" || echo "$output" | grep -q -E "func: 0x[0-9a-fA-F]+"
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260821204930.679027-1-atomlin@atomlin.com?part=4
next prev parent reply other threads:[~2026-08-21 21:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 20:49 [PATCH perf-tools-next v4 0/4] perf trace: Symbolise kernel virtual addresses and function pointers Aaron Tomlin
2026-08-21 20:49 ` [PATCH perf-tools-next v4 1/4] perf trace: Introduce kernel symbol beautifier for virtual addresses Aaron Tomlin
2026-08-21 20:56 ` sashiko-bot
2026-08-21 20:49 ` [PATCH perf-tools-next v4 2/4] perf trace: Auto-assign kernel symbol beautifier to function pointer fields Aaron Tomlin
2026-08-21 20:58 ` sashiko-bot
2026-08-22 20:17 ` Aaron Tomlin
2026-08-21 20:49 ` [PATCH perf-tools-next v4 3/4] perf trace: Enhance BTF type formatting to symbolise kernel function pointers Aaron Tomlin
2026-08-21 21:07 ` sashiko-bot
2026-08-21 20:49 ` [PATCH perf-tools-next v4 4/4] perf tests: Add shell test for kernel symbol beautifier Aaron Tomlin
2026-08-21 21:01 ` sashiko-bot [this message]
2026-08-22 20:47 ` Aaron Tomlin
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=20260821210155.E243F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=atomlin@atomlin.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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