-
- Downloads
perf_counter tools: Provide helper to print percents color
Among perf annotate, perf report and perf top, we can find the common colored printing of percents according to the following rules: High overhead = > 5%, colored in red Mid overhead = > 0.5%, colored in green Low overhead = < 0.5%, default color Factorize these multiple checks in a single function named percent_color_fprintf() and also provide a get_percent_color() for sites which print percentages and other things at the same time. Signed-off-by:Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Anton Blanchard <anton@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <1246558475-10624-2-git-send-email-fweisbec@gmail.com> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
Showing
- tools/perf/builtin-annotate.c 2 additions, 24 deletionstools/perf/builtin-annotate.c
- tools/perf/builtin-report.c 3 additions, 18 deletionstools/perf/builtin-report.c
- tools/perf/builtin-top.c 1 addition, 14 deletionstools/perf/builtin-top.c
- tools/perf/util/color.c 27 additions, 0 deletionstools/perf/util/color.c
- tools/perf/util/color.h 5 additions, 0 deletionstools/perf/util/color.h
Loading
Please register or sign in to comment