diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2018-03-15 20:04:53 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2018-03-20 16:19:30 +0000 |
| commit | 2f025ea0bac2f99a2800f43f139f57c226d3b08b (patch) | |
| tree | e4b822464fe8c388f59961398cdb62fdb64dcbd2 /tools/perf/ui/browsers/annotate.c | |
| parent | perf annotate: Introduce symbol__annotate2 method (diff) | |
| download | kernel-2f025ea0bac2f99a2800f43f139f57c226d3b08b.tar.gz kernel-2f025ea0bac2f99a2800f43f139f57c226d3b08b.zip | |
perf annotate: Introduce annotation_line__max_percent()
Out of the annotate_browser__write() routine, to be used in the --stdio2
mode.
Cc: Adrian Hunter <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jin Yao <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: https://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
| -rw-r--r-- | tools/perf/ui/browsers/annotate.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index ab21739f27ae..05f79f36e906 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c @@ -117,15 +117,10 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int int width = browser->width, printed; int i, pcnt_width = annotation__pcnt_width(notes), cycles_width = annotation__cycles_width(notes); - double percent_max = 0.0; + double percent_max = annotation_line__max_percent(al, notes); char bf[256]; bool show_title = false; - for (i = 0; i < notes->nr_events; i++) { - if (al->samples[i].percent > percent_max) - percent_max = al->samples[i].percent; - } - if ((row == 0) && (al->offset == -1 || percent_max == 0.0)) { if (notes->have_cycles) { if (al->ipc == 0.0 && al->cycles == 0) |
