From: sashiko-bot@kernel.org
To: "Aaron Tomlin" <atomlin@atomlin.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH perf-tools-next v5 4/4] perf tests: Add shell test for kernel symbol beautifier
Date: Sat, 22 Aug 2026 21:48:02 +0000 [thread overview]
Message-ID: <20260822214802.B22261F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260822213558.704018-5-atomlin@atomlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The test script `trace_ksym_beautifier.sh` intends to verify BTF type routing for function pointers using the `timer:hrtimer_start` tracepoint, but this tracepoint's `function` field is of type `void *`, which bypasses the BTF function pointer routing logic. The test only passes due to a hardcoded fallback for arguments named 'function'.
--
--- Patch [4]: [PATCH perf-tools-next v5 4/4] perf tests: Add shell test for kernel symbol beautifier ---
commit e969790d116081081634b0e3ece5c71834b3fe8f
Author: Aaron Tomlin <atomlin@atomlin.com>
perf tests: Add shell test for kernel symbol beautifier
This commit introduces a shell test script to verify that perf trace properly
symbolizes kernel virtual addresses and function pointers. It checks 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..45c803338d4ca
> --- /dev/null
> +++ b/tools/perf/tests/shell/trace_ksym_beautifier.sh
[ ... ]
> +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 timer:hrtimer_start --force-btf --max-events=1 -- sleep 0.01 2>&1)"
[Severity: Medium]
Does this test actually verify BTF type routing?
For the timer:hrtimer_start tracepoint, the function field is declared as
a void pointer in both BTF and tracefs. This means btf_is_func_ptr()
will evaluate to false, and trace__btf_scnprintf() will return 0.
The output is successfully symbolized here only because builtin-trace.c
contains a hardcoded fallback array, syscall_arg_fmts__by_name, that maps
any field named function to SCA_KSYM.
Could a different tracepoint be used here that has an actual function
pointer type in BTF, to ensure the BTF type routing logic is being properly
exercised instead of the hardcoded fallback?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260822213558.704018-1-atomlin@atomlin.com?part=4
next prev parent reply other threads:[~2026-08-22 21:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-22 21:35 [PATCH perf-tools-next v5 0/4] perf trace: Symbolise kernel virtual addresses and function pointers Aaron Tomlin
2026-08-22 21:35 ` [PATCH perf-tools-next v5 1/4] perf trace: Introduce kernel symbol beautifier for virtual addresses Aaron Tomlin
2026-08-22 21:45 ` sashiko-bot
2026-08-22 21:35 ` [PATCH perf-tools-next v5 2/4] perf trace: Auto-assign kernel symbol beautifier to function pointer fields Aaron Tomlin
2026-08-22 21:48 ` sashiko-bot
2026-08-23 22:28 ` Aaron Tomlin
2026-08-22 21:35 ` [PATCH perf-tools-next v5 3/4] perf trace: Enhance BTF type formatting to symbolise kernel function pointers Aaron Tomlin
2026-08-22 21:51 ` sashiko-bot
2026-08-24 10:02 ` Aaron Tomlin
2026-08-22 21:35 ` [PATCH perf-tools-next v5 4/4] perf tests: Add shell test for kernel symbol beautifier Aaron Tomlin
2026-08-22 21:48 ` sashiko-bot [this message]
2026-08-24 11:28 ` 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=20260822214802.B22261F000E9@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