Skip to contentSkip to conversation

Change timestamps representation for keyhandlers

PATCH In review Andrii Anisov 4 participants 4 messages Sep 12, 2018 – Sep 19, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Change timestamps representation for keyhandlers

From: Andrii Anisov <[email protected]>

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

---
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(-)
xen/arch/x86/numa.c +2 -2
index a87987d..d13414a 100644
@@ -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 )
     {
xen/common/keyhandler.c +2 -2
index 777c8e9..60bbeeb 100644
@@ -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);
 
xen/common/page_alloc.c +2 -2
index 02aeed7..16e1b0c 100644
@@ -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++ )
     {
xen/common/perfc.c +2 -4
index 0675677..3abe358 100644
@@ -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 */
 
xen/common/spinlock.c +3 -5
index 36e31c9..6bc52d7 100644
@@ -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);
 }
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v3 1/1
#1 lore raw
Quoted 8 lines · Andrii Anisov

From: Andrii Anisov <[email protected]>

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

Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by
#2 lore raw
Quoted 11 lines · Dario Faggioli
Quoted 8 lines · Andrii Anisov

From: Andrii Anisov <[email protected]>

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

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v3 1/1
#3 lore raw
In reply to Andrii Anisov
Quoted 6 lines · Andrii Anisov

From: Andrii Anisov <[email protected]>

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

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel