From: Andrii Anisov <andrii.anisov@gmail.com>
To: xen-devel@lists.xen.org
Cc: Wei Liu <wei.liu2@citrix.com>,
Andrii Anisov <andrii_anisov@epam.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Dario Faggioli <dfaggioli@suse.com>,
xen-devel@lists.xenproject.org
Subject: [PATCH 2/5] xentrace_format: switch mhz option to float
Date: Mon, 10 Sep 2018 19:41:16 +0300 [thread overview]
Message-ID: <1536597679-8303-3-git-send-email-andrii.anisov@gmail.com> (raw)
In-Reply-To: <1536597679-8303-1-git-send-email-andrii.anisov@gmail.com>
From: Andrii Anisov <andrii_anisov@epam.com>
In some systems fraction of the MHz might be a meaningful part
of the cycles frequency value. So accept MHz value as float.
Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---
tools/xentrace/xentrace_format | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/xentrace/xentrace_format b/tools/xentrace/xentrace_format
index 323d0c2..cae7d34 100644
--- a/tools/xentrace/xentrace_format
+++ b/tools/xentrace/xentrace_format
@@ -11,7 +11,7 @@ def usage():
"Usage: " + sys.argv[0] + """ [-c mhz] defs-file
-c mhz optional time stamps values generator frequency in
MHz. If specified, timestamps are shown in ns,
- otherwise in cycles.
+ otherwise in cycles. Accepts float.
Parses trace data in binary format, as output by Xentrace and
reformats it according to the rules in a file of definitions. The
@@ -65,7 +65,7 @@ def sighand(x,y):
##### Main code
-mhz = 0
+mhz = 0.0
if len(sys.argv) < 2:
usage()
@@ -74,7 +74,7 @@ try:
opts, arg = getopt.getopt(sys.argv[1:], "c:" )
for opt in opts:
- if opt[0] == '-c' : mhz = int(opt[1])
+ if opt[0] == '-c' : mhz = float(opt[1])
except getopt.GetoptError:
usage()
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-09-10 16:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 16:41 [PATCH 0/5] Misc changes to xentrace_format Andrii Anisov
2018-09-10 16:41 ` [PATCH 1/5] xentrace_format: print timestamps in nanoseconds Andrii Anisov
2018-09-11 10:15 ` George Dunlap
2018-09-11 10:32 ` Andrii Anisov
2018-09-11 10:44 ` George Dunlap
2018-09-11 10:45 ` George Dunlap
2018-09-11 15:19 ` Andrii Anisov
2018-09-11 15:54 ` George Dunlap
2018-09-12 7:42 ` Dario Faggioli
2018-09-12 16:44 ` Andrii Anisov
2018-09-12 17:16 ` Andrii Anisov
2018-09-10 16:41 ` Andrii Anisov [this message]
2018-09-11 10:21 ` [PATCH 2/5] xentrace_format: switch mhz option to float George Dunlap
2018-09-10 16:41 ` [PATCH 3/5] xentrace_format: combine 64-bit LE values from traces Andrii Anisov
2018-09-11 10:48 ` George Dunlap
2018-09-11 12:23 ` Andrii Anisov
2018-09-12 7:47 ` Dario Faggioli
2018-09-10 16:41 ` [PATCH 4/5] formats: allign trace record format to the current code Andrii Anisov
2018-09-11 10:51 ` George Dunlap
2018-09-12 7:49 ` Dario Faggioli
2018-09-10 16:41 ` [PATCH 5/5] formats: print time values as decimals Andrii Anisov
2018-09-11 10:33 ` George Dunlap
2018-09-12 7:54 ` Dario Faggioli
2018-09-12 17:28 ` Andrii Anisov
2018-09-12 17:43 ` Dario Faggioli
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=1536597679-8303-3-git-send-email-andrii.anisov@gmail.com \
--to=andrii.anisov@gmail.com \
--cc=andrii_anisov@epam.com \
--cc=dfaggioli@suse.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).