On Tue, Nov 10, 2020 at 02:52:43PM +0800, Leo Yan wrote:
Hi all,
[ + CoreSight Mailing List ]
On the mainlne kernel with the latest commit 407ab579637c "Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm", the perf cs-etm testing fails.
I found the perf cs-etm testing itself has a typo issue and a regression introduced by Perf tool in the recent mainline kernel, so I sent out the two patches for fixing the related issues [1].
Even after applying these two fixings for the testing script, I still observe the etm testing failure with snapshot mode. I manully checked the perf data and confirmed the perf data contains the raw trace data for snapshot (so 'perf script -D' can work well), but it fails to generate any branch samples, so the command 'perf script' will not output any samples.
In case you want to reproduce this issue with perf testing, please use below steps:
- Apply the two patches on the mainline kernel:
$ b4 am 20201110063417.14467-1-leo.yan@linaro.org $ git am ./20201110_leo_yan_perf_test_fix_a_typo_in_cs_etm_testing.mbx
- On the board:
# cd $linux/tools/perf # make VF=1 CORESIGHT=1 # ./perf test list ... 72: Check Arm CoreSight trace data recording and synthesized samples ...
# ./perf test 72 -v ... Recording trace with snapshot mode Couldn't synthesize bpf events. [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 8.014 MB /tmp/__perf_test.perf.data.HdqlK ] Looking at perf.data file for dumping branch samples: aaa test child finished with -1 ---- end ---- Check Arm CoreSight trace data recording and synthesized samples: FAILED!
So you could see the testing can pass for traversing ETM with sinks and system wide mode, but fails with snapshot mode.
Thanks, Leo