[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/5] xentrace_format: switch mhz option to float
From: Andrii Anisov <andrii_anisov@xxxxxxxx> 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@xxxxxxxx> --- 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@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |