From: Yi Sun <yi.sun@intel.com>
To: dave.hansen@intel.com, mingo@kernel.org,
linux-kernel@vger.kernel.org, x86@kernel.org
Cc: sohil.mehta@intel.com, ak@linux.intel.com,
ilpo.jarvinen@linux.intel.com, heng.su@intel.com,
tony.luck@intel.com, yi.sun@linux.intel.com, yu.c.chen@intel.com,
Yi Sun <yi.sun@intel.com>
Subject: [PATCH v7 3/3] tools/testing/fpu: Add a 'count' column.
Date: Thu, 21 Sep 2023 14:29:00 +0800 [thread overview]
Message-ID: <20230921062900.864679-4-yi.sun@intel.com> (raw)
In-Reply-To: <20230921062900.864679-1-yi.sun@intel.com>
Show the total number of each combination of event-RFBM-XINUSE. Users can
identify which data is noise and focus more on useful data.
Signed-off-by: Yi Sun <yi.sun@intel.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
prev parent reply other threads:[~2023-09-21 20:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 6:28 [PATCH v7 0/3] x86/fpu Measure the Latency of XSAVES and XRSTORS Yi Sun
2023-09-21 6:28 ` [PATCH v7 1/3] x86/fpu: Measure the Latency of XSAVE and XRSTOR Yi Sun
2023-09-21 7:03 ` Ingo Molnar
2023-09-21 8:24 ` Yi Sun
2023-09-21 16:52 ` Andi Kleen
2023-09-22 3:44 ` Yi Sun
2023-09-21 6:28 ` [PATCH v7 2/3] tools/testing/fpu: Add script to consume trace log of xsave latency Yi Sun
2023-09-21 6:29 ` Yi Sun [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230921062900.864679-4-yi.sun@intel.com \
--to=yi.sun@intel.com \
--cc=ak@linux.intel.com \
--cc=dave.hansen@intel.com \
--cc=heng.su@intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=sohil.mehta@intel.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yi.sun@linux.intel.com \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®