Hi,
On 24/04/2019 07:55, Leo Yan wrote:
Hi all,
On Wed, Apr 24, 2019 at 02:42:39PM +0800, Leo Yan wrote:
We need a simple method to test Perf with Arm CoreSight drivers, this could be used for smoke testing when new patch is coming for perf or CoreSight drivers, and we also can use the test to confirm if the CoreSight has been enabled successfully on new platforms.
This patch introduces the shell script record+script_arm_cs_etm.sh, it's under the 'pert test' framework. The testing rationale is firstly to search ETR devices under the folder '/sys/bus/coresight/devices/', then traverse for every ETR device to verify trace data recording and decoding. If any ETR device fails for the testing, the test will report failure with directly exiting. This test will be only applied on the platform with PMU event 'cs_etm//', otherwise will skip this testing.
Below is detailed usage for it:
# cd $linux/tools/perf -> This is important so can use shell script # perf test list
[...] 61: Check open filename arg using perf trace + vfs_getname 62: Check Arm CoreSight trace data recording and branch samples 63: Add vfs_getname probe to get syscall args filenames 64: Use vfs_getname probe to get syscall args filenames
# perf test 62
62: Check Arm CoreSight trace data recording and branch samples: Ok
As we discussed in connect, this is drafted testing script based on 'perf test' framework; the first step is to keep the test as simple as possible.
The main purpose for this script is to enable a simple smoke test for perf + CoreSight on the mainline kernel. This could help us easily to find regression and verify new patches. This patch also tries to work without platform dependency.
Please let me know what's you think about this. If we agree with this is the right direction to go, I will send the patch to LKML for wider reviewing.
Adding tests is a good idea. It would be great if we could extend it to cover some of the other commands which use CoreSight trace (e.g. perf report / inject) and some of the other options for trace decode - e.g. branch histories on instruction samples ('l' flag) and other combinations of trace flags (see my other email about crashes :) )
Regards
Rob