mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
perf_counter tools: Display percents of hits in callchain with overhead colors
This adds the use of colors to signal at a glance the important overhead thresholds in callchains hit rates. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Anton Blanchard <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
1e11fd82d2
commit
24b57c6988
1 changed files with 3 additions and 2 deletions
|
|
@ -824,7 +824,7 @@ ipchain__fprintf_graph(FILE *fp, struct callchain_list *chain, int depth,
|
|||
double percent;
|
||||
|
||||
percent = hits * 100.0 / total_samples;
|
||||
ret += fprintf(fp, "--%2.2f%%-- ", percent);
|
||||
ret += percent_color_fprintf(fp, "--%2.2f%%-- ", percent);
|
||||
} else
|
||||
ret += fprintf(fp, "%s", " ");
|
||||
}
|
||||
|
|
@ -924,7 +924,8 @@ hist_entry_callchain__fprintf(FILE *fp, struct hist_entry *self,
|
|||
chain = rb_entry(rb_node, struct callchain_node, rb_node);
|
||||
percent = chain->hit * 100.0 / total_samples;
|
||||
if (callchain_mode == FLAT) {
|
||||
ret += fprintf(fp, " %6.2f%%\n", percent);
|
||||
ret += percent_color_fprintf(fp, " %6.2f%%\n",
|
||||
percent);
|
||||
ret += callchain__fprintf_flat(fp, chain, total_samples);
|
||||
} else if (callchain_mode == GRAPH) {
|
||||
ret += callchain__fprintf_graph(fp, chain,
|
||||
|
|
|
|||
Loading…
Reference in a new issue