perf sched map: Apply cpu color when there's an activity
authorNamhyung Kim <namhyung@kernel.org>
Mon, 24 Oct 2016 02:02:43 +0000 (11:02 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 25 Oct 2016 18:04:48 +0000 (15:04 -0300)
Applying cpu color always doesn't help readability IMHO.  Instead it
might be better to applying the color when there's an activity on those
CPUs.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20161024020246.14928-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-sched.c

index 8ca1b5409289c102b83c3aa93db1d5cd9064afb5..a8ad8591446628276881eeff0692286292991f6f 100644 (file)
@@ -1479,7 +1479,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel,
                        cpu_color = COLOR_CPUS;
 
                if (cpu != this_cpu)
-                       color_fprintf(stdout, cpu_color, " ");
+                       color_fprintf(stdout, color, " ");
                else
                        color_fprintf(stdout, cpu_color, "*");