diff mbox

[07/15] tools: tracing: handle IRQs on/off events in xentrace and xenalyze

Message ID 149633846443.12814.10217161134560258968.stgit@Solace.fritz.box (mailing list archive)
State New, archived
Headers show

Commit Message

Dario Faggioli June 1, 2017, 5:34 p.m. UTC
so the trace will show properly decoded info,
rather than just a bunch of hex codes.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
---
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Jennifer Herbert <jennifer.herbert@citrix.com>
---
 tools/xentrace/formats    |    2 ++
 tools/xentrace/xenalyze.c |   16 ++++++++++++++++
 2 files changed, 18 insertions(+)

Comments

George Dunlap June 13, 2017, 3:58 p.m. UTC | #1
On 01/06/17 18:34, Dario Faggioli wrote:
> so the trace will show properly decoded info,
> rather than just a bunch of hex codes.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>

Acked-by: George Dunlap <george.dunlap@citrix.com>
diff mbox

Patch

diff --git a/tools/xentrace/formats b/tools/xentrace/formats
index 00c29b8..2e653ca 100644
--- a/tools/xentrace/formats
+++ b/tools/xentrace/formats
@@ -202,6 +202,8 @@ 
 0x0080200a  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  do_irq [ irq = %(1)d ]
 0x0080200b  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  do_guest_irq [ irq = %(1)d ]
 0x0080200c  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  irq_exit [ irq = %(1)d, status = 0x%(2)x, in_irq = %(3)d ]
+0x0080200d  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  irq_disable [ from = 0x%(2)08x%(1)08x ]
+0x0080200e  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  irq_enable  [ from = 0x%(2)08x%(1)08x ]
 
 0x00084001  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  hpet create [ tn = %(1)d, irq = %(2)d, delta = 0x%(4)08x%(3)08x, period = 0x%(6)08x%(5)08x ]
 0x00084002  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  pit create [ delta = 0x%(1)016x, period = 0x%(2)016x ]
diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
index 3c2f600..c4a8340 100644
--- a/tools/xentrace/xenalyze.c
+++ b/tools/xentrace/xenalyze.c
@@ -8562,6 +8562,22 @@  void irq_process(struct pcpu_info *p) {
         }
         break;
     }
+    case TRC_HW_IRQ_DISABLE:
+    case TRC_HW_IRQ_ENABLE:
+    {
+        struct {
+            uint64_t addr;
+        } *r = (typeof(r))ri->d;
+
+        if ( opt.dump_all )
+        {
+            printf(" %s irq_%s, from %p\n",
+                   ri->dump_header,
+                   ri->event == TRC_HW_IRQ_DISABLE ? "disable" : "enable",
+                   (void*)r->addr);
+        }
+        break;
+    }
     case TRC_HW_IRQ_CLEAR_VECTOR:
     case TRC_HW_IRQ_MOVE_FINISH :
     default: