xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Anisov <andrii.anisov@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Andrii Anisov <andrii_anisov@epam.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Jan Beulich <jbeulich@suse.com>, Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH v3] Change timestamps representation for keyhandlers
Date: Wed, 12 Sep 2018 20:03:27 +0300	[thread overview]
Message-ID: <1536771807-1118-1-git-send-email-andrii.anisov@gmail.com> (raw)

From: Andrii Anisov <andrii_anisov@epam.com>

For different keyhandlers, replace a hex with delimiter representation
of time to PRI_stime which is decimal ns currently.

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---
Changes in v3:
    - patch a missed dump_domains() keyhandler

Changes in v2:
    - Time representation change propagated to all keyhandlers as agreed here [1]
    - Title and message are changed

[1] - https://lists.xenproject.org/archives/html/xen-devel/2018-09/msg00999.html

---
 xen/arch/x86/numa.c     | 4 ++--
 xen/common/keyhandler.c | 4 ++--
 xen/common/page_alloc.c | 4 ++--
 xen/common/perfc.c      | 6 ++----
 xen/common/spinlock.c   | 8 +++-----
 5 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c
index a87987d..d13414a 100644
--- a/xen/arch/x86/numa.c
+++ b/xen/arch/x86/numa.c
@@ -378,8 +378,8 @@ static void dump_numa(unsigned char key)
     unsigned int page_num_node[MAX_NUMNODES];
     const struct vnuma_info *vnuma;
 
-    printk("'%c' pressed -> dumping numa info (now-0x%X:%08X)\n", key,
-           (u32)(now>>32), (u32)now);
+    printk("'%c' pressed -> dumping numa info (now = %"PRI_stime")\n", key,
+           now);
 
     for_each_online_node ( i )
     {
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 777c8e9..60bbeeb 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -286,8 +286,8 @@ static void dump_domains(unsigned char key)
     s_time_t       now = NOW();
 #define tmpstr keyhandler_scratch
 
-    printk("'%c' pressed -> dumping domain info (now=0x%X:%08X)\n", key,
-           (u32)(now>>32), (u32)now);
+    printk("'%c' pressed -> dumping domain info (now = %"PRI_stime"\n", key,
+           now);
 
     rcu_read_lock(&domlist_read_lock);
 
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 02aeed7..16e1b0c 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -2420,8 +2420,8 @@ static void dump_heap(unsigned char key)
     s_time_t      now = NOW();
     int           i, j;
 
-    printk("'%c' pressed -> dumping heap info (now-0x%X:%08X)\n", key,
-           (u32)(now>>32), (u32)now);
+    printk("'%c' pressed -> dumping heap info (now = %"PRI_stime")\n", key,
+           now);
 
     for ( i = 0; i < MAX_NUMNODES; i++ )
     {
diff --git a/xen/common/perfc.c b/xen/common/perfc.c
index 0675677..3abe358 100644
--- a/xen/common/perfc.c
+++ b/xen/common/perfc.c
@@ -33,8 +33,7 @@ void perfc_printall(unsigned char key)
     unsigned int i, j;
     s_time_t now = NOW();
 
-    printk("Xen performance counters SHOW  (now = 0x%08X:%08X)\n",
-           (u32)(now>>32), (u32)now);
+    printk("Xen performance counters SHOW  (now = %"PRI_stime")\n", now);
 
     for ( i = j = 0; i < NR_PERFCTRS; i++ )
     {
@@ -122,8 +121,7 @@ void perfc_reset(unsigned char key)
     s_time_t now = NOW();
 
     if ( key != '\0' )
-        printk("Xen performance counters RESET (now = 0x%08X:%08X)\n",
-               (u32)(now>>32), (u32)now);
+        printk("Xen performance counters RESET (now = %"PRI_stime")\n", now);
 
     /* leave STATUS counters alone -- don't reset */
 
diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c
index 36e31c9..6bc52d7 100644
--- a/xen/common/spinlock.c
+++ b/xen/common/spinlock.c
@@ -359,9 +359,8 @@ void spinlock_profile_printall(unsigned char key)
     s_time_t diff;
 
     diff = now - lock_profile_start;
-    printk("Xen lock profile info SHOW  (now = %08X:%08X, "
-        "total = %08X:%08X)\n", (u32)(now>>32), (u32)now,
-        (u32)(diff>>32), (u32)diff);
+    printk("Xen lock profile info SHOW  (now = %"PRI_stime" total = "
+           "%"PRI_stime")\n", now, diff);
     spinlock_profile_iterate(spinlock_profile_print_elem, NULL);
 }
 
@@ -379,8 +378,7 @@ void spinlock_profile_reset(unsigned char key)
     s_time_t now = NOW();
 
     if ( key != '\0' )
-        printk("Xen lock profile info RESET (now = %08X:%08X)\n",
-            (u32)(now>>32), (u32)now);
+        printk("Xen lock profile info RESET (now = %"PRI_stime")\n", now);
     lock_profile_start = now;
     spinlock_profile_iterate(spinlock_profile_reset_elem, NULL);
 }
-- 
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-12 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 17:03 Andrii Anisov [this message]
2018-09-13 13:22 ` [PATCH v3] Change timestamps representation for keyhandlers Dario Faggioli
2018-09-19 16:07   ` Wei Liu
2018-09-19 16:13 ` George Dunlap

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=1536771807-1118-1-git-send-email-andrii.anisov@gmail.com \
    --to=andrii.anisov@gmail.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=andrii_anisov@epam.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --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).