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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230901143414.1664368-4-yi.sun@intel.com>
Date:   Fri,  1 Sep 2023 22:34:14 +0800
From:   Yi Sun <yi.sun@...el.com>
To:     dave.hansen@...el.com, tglx@...utronix.de,
        linux-kernel@...r.kernel.org, x86@...nel.org
Cc:     sohil.mehta@...el.com, ak@...ux.intel.com,
        ilpo.jarvinen@...ux.intel.com, heng.su@...el.com,
        tony.luck@...el.com, dave.hansen@...ux.intel.com,
        yi.sun@...el.intel.com, Yi Sun <yi.sun@...el.com>
Subject: [PATCH v6 3/3] tools/testing/fpu: Add a 'count' column.

Show the total number of each combination of event-RFBM-XINUSE. Users can
identify which data is noise and focus more on useful data.

The sample of the output is as follows:
EVENTs         RFBM     XINUSE   CNT     min   max   avg   avg(97%)
---...-------  -------  -------  ------  ----  ----  ----  --------
x86..._xrstor  0x20ee7  0x0      1       xx    xx    xx    xx
x86..._xrstor  0x20ee7  0x2a2    997860  xx    xxx   xx    xx
x86..._xsave   0x20ee7  0x2a2    45      xx    xx    xx    xx
x86..._xsave   0x20ee7  0x2e6    146613  xx    xxxx  xx    xx
x86..._xsave   0x20ee7  0x202a2  31555   xx    xxx   xx    xx
x86..._xsave   0x60ee7  0x602a2  818608  xx    xxxx  xx    xx
x86..._xsave   0x60ee7  0x602a3  1       xx    xx    xx    xx

Signed-off-by: Yi Sun <yi.sun@...el.com>

diff --git a/tools/testing/fpu/xsave-latency-trace.sh b/tools/testing/fpu/xsave-latency-trace.sh
index d45563984fd6..b2f7c3d0dd65 100755
--- a/tools/testing/fpu/xsave-latency-trace.sh
+++ b/tools/testing/fpu/xsave-latency-trace.sh
@@ -99,11 +99,14 @@ function insert_line() {
 
 # Show the results of the trace statistics
 function get_latency_stat() {
+	cnt=`get_combs_cnt`
+
 	SQL_CMD "create table $table_results (
 		id INTEGER PRIMARY KEY AUTOINCREMENT,
 		event_name TEXT,
 		RFBM INT,
 		XINUSE INT,
+		CNT INT,
 		lat_min INT,
 		lat_max INT,
 		lat_avg INT,
@@ -121,14 +124,18 @@ function get_latency_stat() {
 		lat_avg=`round $lat_avg`
 		lat_tail_avg=`round $lat_tail_avg`
 
+		count=`SQL_CMD "SELECT count(*) from $table_raw
+			where event_name=\"$event_name\" and RFBM=$RFBM and
+			XINUSE=$XINUSE;"`
+
 		SQL_CMD "INSERT INTO $table_results
-			(event_name, RFBM,XINUSE, lat_min, lat_max, lat_avg, lat_tail_avg)
-			VALUES (\"$event_name\", $RFBM, $XINUSE, $lat_min, $lat_max,
+			(event_name,RFBM,XINUSE, CNT, lat_min, lat_max, lat_avg, lat_tail_avg)
+			VALUES (\"$event_name\", $RFBM, $XINUSE, $count, $lat_min, $lat_max,
 			$lat_avg, $lat_tail_avg);"
 	done
 
 	SQL_CMD_HEADER "select event_name[EVENTs],printf('0x%x',RFBM)[RFBM],
-			printf('0x%x',XINUSE)[XINUSE],lat_min,lat_max,lat_avg,
+			printf('0x%x',XINUSE)[XINUSE],CNT,lat_min,lat_max,lat_avg,
 			lat_tail_avg[lat_avg(97%)]
 			from $table_results;"
 }
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ