xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
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 1/5] xentrace_format: print timestamps in nanoseconds
Date: Mon, 10 Sep 2018 19:41:15 +0300	[thread overview]
Message-ID: <1536597679-8303-2-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>

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---
 tools/xentrace/xentrace_format | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xentrace_format b/tools/xentrace/xentrace_format
index 5ff85ae..323d0c2 100644
--- a/tools/xentrace/xentrace_format
+++ b/tools/xentrace/xentrace_format
@@ -8,7 +8,11 @@ import re, sys, string, signal, struct, os, getopt
 
 def usage():
     print >> sys.stderr, \
-          "Usage: " + sys.argv[0] + """ defs-file
+          "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.
+
           Parses trace data in binary format, as output by Xentrace and
           reformats it according to the rules in a file of definitions.  The
           rules in this file should have the format ({ and } show grouping
@@ -223,7 +227,7 @@ while not interrupted:
             last_tsc[cpu] = tsc
 
         if mhz:
-            tsc = tsc / (mhz*1000000.0)
+            tsc = tsc * 1000.0 / mhz
 
         args = {'cpu'   : cpu,
                 'tsc'   : tsc,
-- 
2.7.4


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

  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 ` Andrii Anisov [this message]
2018-09-11 10:15   ` [PATCH 1/5] xentrace_format: print timestamps in nanoseconds 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 ` [PATCH 2/5] xentrace_format: switch mhz option to float Andrii Anisov
2018-09-11 10:21   ` 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-2-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).