Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf test test_intel_pt.sh: Test sample mode with event with PMU name

br_misp_retired.all_branches is supported on processors that support
Intel PT, so use it to test sample mode with an event that has been
given a PMU name.

Please note, the test fails prior to the fix "perf parse-events: Do not
break up AUX event group".

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20230508093952.27482-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
a4680850 12336165

+7
+7
tools/perf/tests/shell/test_intel_pt.sh
··· 506 506 echo "perf record failed with --aux-sample" 507 507 return 1 508 508 fi 509 + # Check with event with PMU name 510 + if perf_record_no_decode -o "${perfdatafile}" -e br_misp_retired.all_branches:u uname ; then 511 + if ! perf_record_no_decode -o "${perfdatafile}" -e '{intel_pt//,br_misp_retired.all_branches/aux-sample-size=8192/}:u' uname ; then 512 + echo "perf record failed with --aux-sample-size" 513 + return 1 514 + fi 515 + fi 509 516 echo OK 510 517 return 0 511 518 }