aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-07-27 10:24:59 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-07-28 11:53:06 -0400
commitbb79a232b0881ce47f921a53f40612a9f9996482 (patch)
treeed5d80256f140b2df77cf198031f2c3ebb82d7e2 /tools/perf/ui/browsers/annotate.c
parent48cc33085253d607706e68a67ac98fe2a6abdd3d (diff)
perf annotate TUI: Use sym_hist_entry in disasm_line_samples
Just paving the way to fix --show-total-period in the TUI, i.e. now we save in struct disasm_line_samples not just the number of samples, but also the total period. Based-on-a-patch-by: Taeung Song <treeze.taeung@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/n/tip-1sup5hkwrxocjvrmrmhs732o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r--tools/perf/ui/browsers/annotate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index dbe4e630b90f..680fff70f7a0 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -17,8 +17,8 @@
17#include <sys/ttydefaults.h> 17#include <sys/ttydefaults.h>
18 18
19struct disasm_line_samples { 19struct disasm_line_samples {
20 double percent; 20 double percent;
21 u64 nr; 21 struct sym_hist_entry he;
22}; 22};
23 23
24#define IPC_WIDTH 6 24#define IPC_WIDTH 6
@@ -152,7 +152,7 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int
152 current_entry); 152 current_entry);
153 if (annotate_browser__opts.show_total_period) { 153 if (annotate_browser__opts.show_total_period) {
154 ui_browser__printf(browser, "%6" PRIu64 " ", 154 ui_browser__printf(browser, "%6" PRIu64 " ",
155 bdl->samples[i].nr); 155 bdl->samples[i].he.nr_samples);
156 } else { 156 } else {
157 ui_browser__printf(browser, "%6.2f ", 157 ui_browser__printf(browser, "%6.2f ",
158 bdl->samples[i].percent); 158 bdl->samples[i].percent);
@@ -457,7 +457,7 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
457 pos->offset, 457 pos->offset,
458 next ? next->offset : len, 458 next ? next->offset : len,
459 &path, &sample); 459 &path, &sample);
460 bpos->samples[i].nr = sample.nr_samples; 460 bpos->samples[i].he = sample;
461 461
462 if (max_percent < bpos->samples[i].percent) 462 if (max_percent < bpos->samples[i].percent)
463 max_percent = bpos->samples[i].percent; 463 max_percent = bpos->samples[i].percent;