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.
P.s. this patch has below two warning with checkpatch.pl, I think we can ignore these two warnings after I reviewed them; especially for the second warning, the second line in the script must be used by 'perf test' to read out the testing name so this is conflict with the Lincense. Will check this with Arnaldo when send patch to LKML.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #42: new file mode 100755
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2 #48: FILE: tools/perf/tests/shell/record+script_arm_cs_etm.sh:2: +# Check Arm CoreSight trace data recording and branch samples
total: 0 errors, 2 warnings, 47 lines checked
[...]
Thanks, Leo Yan