Commit-ID:  29dc267f270a4ad5ae1341e7fdc8539ac7dc907a
Gitweb:     http://git.kernel.org/tip/29dc267f270a4ad5ae1341e7fdc8539ac7dc907a
Author:     Taeung Song <[email protected]>
AuthorDate: Thu, 27 Jul 2017 11:33:20 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 28 Jul 2017 12:53:06 -0300

perf annotate TUI: Fix --show-total-period

We were showing the number of samples, not the total period, fix it.

Reported-by: Namhyung Kim <[email protected]>
Signed-off-by: Taeung Song <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Martin Liška <[email protected]>
Cc: Milian Wolff <[email protected]>
Cc: Jiri Olsa <[email protected]>
Fixes: 0c4a5bcea460 ("perf annotate: Display total number of samples with 
--show-total-period")
Link: 
http://lkml.kernel.org/r/[email protected]
[ extracted from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/ui/browsers/annotate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/annotate.c 
b/tools/perf/ui/browsers/annotate.c
index 680fff7..c382b1d 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -152,7 +152,7 @@ static void annotate_browser__write(struct ui_browser 
*browser, void *entry, int
                                                current_entry);
                        if (annotate_browser__opts.show_total_period) {
                                ui_browser__printf(browser, "%6" PRIu64 " ",
-                                                  
bdl->samples[i].he.nr_samples);
+                                                  bdl->samples[i].he.period);
                        } else {
                                ui_browser__printf(browser, "%6.2f ",
                                                   bdl->samples[i].percent);

Reply via email to