mirror of
https://github.com/torvalds/linux.git
synced 2026-04-24 09:35:52 -04:00
pert tests: Add tests for new "perf stat --per-cache" aggregation option
Add tests for the new "--per-cache" option in 'perf stat' for CSV and JSON generation as well as for the JSON linting. Suggested-by: Gautham Shenoy <gautham.shenoy@amd.com> Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ananth Narayan <ananth.narayan@amd.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Cc: Sandipan Das <sandipan.das@amd.com> Cc: Stephane Eranian <eranian@google.com> Cc: Wen Pu <puwen@hygon.cn> Link: https://lore.kernel.org/r/20230517172745.5833-6-kprateek.nayak@amd.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
aab667ca88
commit
bfce728db3
@@ -40,6 +40,7 @@ function commachecker()
|
||||
;; "--per-socket") exp=8
|
||||
;; "--per-node") exp=8
|
||||
;; "--per-die") exp=8
|
||||
;; "--per-cache") exp=8
|
||||
esac
|
||||
|
||||
while read line
|
||||
@@ -145,6 +146,18 @@ check_per_thread()
|
||||
echo "[Success]"
|
||||
}
|
||||
|
||||
check_per_cache_instance()
|
||||
{
|
||||
echo -n "Checking CSV output: per cache instance "
|
||||
if ParanoidAndNotRoot 0
|
||||
then
|
||||
echo "[Skip] paranoid and not root"
|
||||
return
|
||||
fi
|
||||
perf stat -x$csv_sep --per-cache -a true 2>&1 | commachecker --per-cache
|
||||
echo "[Success]"
|
||||
}
|
||||
|
||||
check_per_die()
|
||||
{
|
||||
echo -n "Checking CSV output: per die "
|
||||
@@ -222,6 +235,7 @@ if [ $skip_test -ne 1 ]
|
||||
then
|
||||
check_system_wide_no_aggr
|
||||
check_per_core
|
||||
check_per_cache_instance
|
||||
check_per_die
|
||||
check_per_socket
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user