From: sashiko-bot@kernel.org
To: "Amir Ayupov" <aaupov@fb.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 7/9] perf test cs-etm: Test branch history on existing samples
Date: Mon, 03 Aug 2026 09:21:24 +0000 [thread overview]
Message-ID: <20260803092125.620591F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260803090640.2412336-7-aaupov@fb.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] `check_callchains` does not verify callchains for each process as claimed in the commit message.
--
--- Patch [7]: [PATCH 7/9] perf test cs-etm: Test branch history on existing samples ---
commit e252ec70028dd10b925f2e4ea78b626688f184d4
Author: Amir Ayupov <aaupov@fb.com>
perf test cs-etm: Test branch history on existing samples
This commit adds a CoreSight shell test to verify branch history on existing
samples using explicitly timestamped ETM traces. It decodes traces with L4 and
L64 depth settings and checks that pause samples contain valid multi-frame
callchains and bounded branch stacks.
> diff --git a/tools/perf/tests/shell/coresight/add_last_branch.sh b/tools/perf/tests/shell/coresight/add_last_branch.sh
> new file mode 100755
> --- /dev/null
> +++ b/tools/perf/tests/shell/coresight/add_last_branch.sh
[ ... ]
> +check_callchains()
> +{
> + local output="$tmpdir/script-callchain"
> +
> + perf script -i "$tmpdir/data" -F comm,event,ip >"$output" 2>/dev/null
> +
> + awk '
> + /cycles\/aux-action=pause/ {
> + in_sample = 1
> + frames = 0
> + next
> + }
> + !NF {
> + if (in_sample && frames >= 2)
> + found = 1
> + in_sample = 0
> + next
> + }
[Severity: Medium]
The commit message states the test will "check that the pause samples carry
both a multi-frame callchain and a non-empty branch stack for each of the
workload's two processes."
Does this awk script in check_callchains() verify the callchains for each
process?
Unlike check_process_samples(), which checks for proc1 and proc2, this
script appears to set found=1 as soon as any sample contains a multi-frame
callchain, without validating the comm field.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260803090640.2412336-1-aaupov@fb.com?part=7
next prev parent reply other threads:[~2026-08-03 9:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 9:06 [PATCH 1/9] perf header: Tolerate inconsistent HEADER_GROUP_DESC Amir Ayupov
2026-08-03 9:06 ` [PATCH 2/9] perf thread-stack: Report branch stack hw_idx as not available Amir Ayupov
2026-08-03 9:19 ` sashiko-bot
2026-08-03 9:06 ` [PATCH 3/9] perf thread-stack: Bound wrapped branch stack copy Amir Ayupov
2026-08-03 9:26 ` sashiko-bot
2026-08-03 9:06 ` [PATCH 4/9] perf dlfilter: Add non-empty branch stack filter Amir Ayupov
2026-08-03 9:06 ` [PATCH 5/9] perf cs-etm: Split up cs_etm__process_timestamped_queues() Amir Ayupov
2026-08-03 9:06 ` [PATCH 6/9] perf cs-etm: Add branch history to existing samples Amir Ayupov
2026-08-03 9:23 ` sashiko-bot
2026-08-03 9:06 ` [PATCH 7/9] perf test cs-etm: Test branch history on " Amir Ayupov
2026-08-03 9:21 ` sashiko-bot [this message]
2026-08-03 9:06 ` [PATCH 8/9] perf cs-etm: Consume branch history when attaching it to a sample Amir Ayupov
2026-08-03 9:06 ` [PATCH 9/9] Documentation: coresight: Document context-sensitive PGO workflow Amir Ayupov
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=20260803092125.620591F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aaupov@fb.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