lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220413010221.81332-1-leo.yan@linaro.org>
Date:   Wed, 13 Apr 2022 09:02:21 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        James Clark <james.clark@....com>,
        German Gomez <german.gomez@....com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Leo Yan <leo.yan@...aro.org>
Subject: [PATCH] perf arm-spe: Test memory samples

Add a new test to verify the Arm SPE synthesized memory samples with
'perf mem report' command.

Signed-off-by: Leo Yan <leo.yan@...aro.org>
---
 tools/perf/tests/shell/test_arm_spe.sh | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/test_arm_spe.sh b/tools/perf/tests/shell/test_arm_spe.sh
index e59044edc406..b36125e127eb 100755
--- a/tools/perf/tests/shell/test_arm_spe.sh
+++ b/tools/perf/tests/shell/test_arm_spe.sh
@@ -62,6 +62,18 @@ perf_report_samples() {
 		egrep " +[0-9]+\.[0-9]+% +[0-9]+\.[0-9]+% +$1 " > /dev/null 2>&1
 }
 
+perf_mem_report_samples() {
+	echo "Looking at perf.data file for reporting memory samples:"
+
+	# Below is an example of the memory samples reporting:
+	#   20.71%    1696    27    L1 hit     [k] el0t_64_sync_handler    [kernel.kallsyms]    ...
+	#   17.21%    1903    20    L1 hit     [k] el0t_64_sync            [kernel.kallsyms]    ...
+	#    8.52%     897    21    L1 hit     [k] ksys_read               [kernel.kallsyms]    ...
+	#    0.12%      16    17    L1 hit     [.] 0x0000000000004ce8      dd                   ...
+	perf mem report --stdio -i ${perfdata} 2>&1 | \
+		egrep " +[0-9]+\.[0-9]+% +[0-9]+ +[0-9]+ .* +$1 " > /dev/null 2>&1
+}
+
 arm_spe_snapshot_test() {
 	echo "Recording trace with snapshot mode $perfdata"
 	perf record -o ${perfdata} -e arm_spe// -S \
@@ -79,7 +91,8 @@ arm_spe_snapshot_test() {
 	wait $PERFPID
 
 	perf_script_samples dd &&
-	perf_report_samples dd
+	perf_report_samples dd &&
+	perf_mem_report_samples dd
 
 	err=$?
 	arm_spe_report "SPE snapshot testing" $err
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ