Re: [Xen-devel] [PATCH 2/5] xentrace_format: switch mhz option to float

2018-09-11 Thread George Dunlap
On 09/10/2018 05:41 PM, Andrii Anisov wrote:
> From: Andrii Anisov 
> 
> 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 

Acked-by: George Dunlap 

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH 2/5] xentrace_format: switch mhz option to float

2018-09-10 Thread Andrii Anisov
From: Andrii Anisov 

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 
---
 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