xenalyze: handle DOM0 operations events
authorDario Faggioli <dario.faggioli@citrix.com>
Tue, 16 Feb 2016 12:00:51 +0000 (13:00 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 1 Apr 2016 13:59:19 +0000 (14:59 +0100)
(i.e., domain creation and destruction) 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>
tools/xentrace/xenalyze.c

index d4a5b0c64324bf9c249919ab55a731e65950a4b0..353bed7711b3df860701050d4e4e137a2ffff3a7 100644 (file)
@@ -8388,6 +8388,30 @@ void hw_process(struct pcpu_info *p)
     }
 
 }
+
+#define TRC_DOM0_SUB_DOMOPS 1
+void dom0_process(struct pcpu_info *p)
+{
+    struct record_info *ri = &p->ri;
+
+    switch(ri->evt.sub)
+    {
+    case TRC_DOM0_SUB_DOMOPS:
+        if(opt.dump_all) {
+            struct {
+                unsigned int domid;
+            } *r = (typeof(r))ri->d;
+
+        printf(" %s %s domain d%u\n", ri->dump_header,
+               ri->event == TRC_DOM0_DOM_ADD ? "creating" : "destroying",
+               r->domid);
+        }
+        break;
+    default:
+        process_generic(&p->ri);
+    }
+}
+
 /* ---- Base ----- */
 void dump_generic(FILE * f, struct record_info *ri)
 {
@@ -9224,6 +9248,8 @@ void process_record(struct pcpu_info *p) {
             hw_process(p);
             break;
         case TRC_DOM0OP_MAIN:
+            dom0_process(p);
+            break;
         default:
             process_generic(ri);
         }