aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index be1698f1189b..8ba24808a392 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -248,13 +248,16 @@ static void print_sym_table(void)
248 sum_ksamples)); 248 sum_ksamples));
249 249
250 /* 250 /*
251 * We color high-overhead entries in red, low-overhead 251 * We color high-overhead entries in red, mid-overhead
252 * entries in green - and keep the middle ground normal: 252 * entries in green - and keep the low overhead places
253 * normal:
253 */ 254 */
254 if (pcnt >= 5.0) 255 if (pcnt >= 5.0) {
255 color = PERF_COLOR_RED; 256 color = PERF_COLOR_RED;
256 if (pcnt < 0.5) 257 } else {
257 color = PERF_COLOR_GREEN; 258 if (pcnt >= 0.5)
259 color = PERF_COLOR_GREEN;
260 }
258 261
259 if (nr_counters == 1) 262 if (nr_counters == 1)
260 printf("%20.2f - ", syme->weight); 263 printf("%20.2f - ", syme->weight);