aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/pmu-events/jevents.c
diff options
context:
space:
mode:
authorLeo Yan <leo.yan@linaro.org>2020-09-07 21:01:54 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-09-10 09:08:10 -0300
commitfe0aed19b266fdcbb5dd7abc9ac9b4a64ae82f91 (patch)
treef335138ebd1882e1afd1f6ce6c476603015724b5 /tools/perf/pmu-events/jevents.c
parentperf metricgroup: Fix typo in comment. (diff)
downloadlinux-dev-fe0aed19b266fdcbb5dd7abc9ac9b4a64ae82f91.tar.xz
linux-dev-fe0aed19b266fdcbb5dd7abc9ac9b4a64ae82f91.zip
perf test: Introduce script for Arm CoreSight testing
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 test_arm_coresight.sh which is under the 'pert test' framework. This script provides three testing scenarios: Test scenario 1: traverse all possible paths between source and sink For traversing possible paths, simply to say, the testing rationale is source oriented testing, it traverses every source (now only refers to ETM device) and test its all possible sinks. To search the complete paths from one specific source to its sinks, this patch relies on the sysfs '/sys/bus/coresight/devices/devX/out:Y' for depth-first search (DFS) for iteration connected device nodes, if the output device is detected as a sink device (the script will exclude TPIU device which can not be supported for perf PMU), then it will test trace data recording and decoding for it. The script runs three output testings for every trace data: - Test branch samples dumping with 'perf script' command; - Test branch samples reporting with 'perf report' command; - Use option '--itrace=i1000i' to insert synthesized instructions events and the script will check if perf can output the percentage value successfully based on the instruction samples. Test scenario 2: system-wide test For system-wide testing, it passes option '-a' to perf tool to enable tracing on all CPUs, so it's hard to say which program will be traced. But perf tool itself contributes much overload in this case, so it will parse trace data and check if process 'perf' can be detected or not. Test scenario 3: snapshot mode test. For snapshot mode testing, it uses 'dd' command to launch a long running program, so this can give chance to send signal -USR2; it will check the captured trace data contains 'dd' related thread info or not. If any test fails, it will report failure and directly exit with error. This test will be only applied on a platform with PMU event 'cs_etm//', otherwise will skip the testing. Below is detailed usage for it: # cd $linux/tools/perf -> This is important so can use shell script # perf test list [...] 70: probe libc's inet_pton & backtrace it with ping 71: Check Arm CoreSight trace data recording and synthesized samples 72: Check open filename arg using perf trace + vfs_getname 73: Zstd perf.data compression/decompression 74: Add vfs_getname probe to get syscall args filenames 75: Use vfs_getname probe to get syscall args filenames # perf test 71 71: Check Arm CoreSight trace data recording and branch samples: Ok Signed-off-by: Leo Yan <leo.yan@linaro.org> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20200907130154.9601-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/pmu-events/jevents.c')
0 files changed, 0 insertions, 0 deletions