Re: [PATCH 7/9] perf test cs-etm: Test branch history on existing samples
[email protected] Mon, 03 Aug 2026 09:21:24 +0000
| Newsgroups | org.kernel.vger.linux-perf-users |
|---|---|
| Message-ID | <[email protected]> |
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 a= s claimed in the commit message. -- --- Patch [7]: [PATCH 7/9] perf test cs-etm: Test branch history on existin= g samples --- commit e252ec70028dd10b925f2e4ea78b626688f184d4 Author: Amir Ayupov <[email protected]> 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=3D"$tmpdir/script-callchain" > + > + perf script -i "$tmpdir/data" -F comm,event,ip >"$output" 2>/dev/null > + > + awk ' > + /cycles\/aux-action=3Dpause/ { > + in_sample =3D 1 > + frames =3D 0 > + next > + } > + !NF { > + if (in_sample && frames >=3D 2) > + found =3D 1 > + in_sample =3D 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=3D1 as soon as any sample contains a multi-frame callchain, without validating the comm field. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260803090640.2412= [email protected]?part=3D7