tools: xenalyze: kill spurious sched_switch output in non dump mode.
authorDario Faggioli <dario.faggioli@citrix.com>
Thu, 4 Aug 2016 08:59:03 +0000 (10:59 +0200)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 8 Aug 2016 09:40:38 +0000 (10:40 +0100)
In fact, 52cf096df7 ("xenalyze: handle scheduling event"),
when dealing with TRC_SCHED_SWITCH, forgot to check whether
we actually are in dump mode, causing the printf() in
dump_sched_switch() to always produce its output, which
is not what we want.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
tools/xentrace/xenalyze.c

index d223de6260b70c6c37de54fc37dc4ff44c7012f5..3d06e45b3653144588f5b4485228abeef40c253c 100644 (file)
@@ -7629,7 +7629,8 @@ void sched_process(struct pcpu_info *p)
             }
             break;
         case TRC_SCHED_SWITCH:
-            dump_sched_switch(ri);
+            if(opt.dump_all)
+                dump_sched_switch(ri);
             break;
         case TRC_SCHED_SWITCH_INFPREV:
             if(opt.dump_all) {