From: Taeung Song Date: Thu, 27 Jul 2017 14:33:20 +0000 (-0300) Subject: perf annotate TUI: Fix --show-total-period X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29dc267f270a4ad5ae1341e7fdc8539ac7dc907a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf annotate TUI: Fix --show-total-period We were showing the number of samples, not the total period, fix it. Reported-by: Namhyung Kim Signed-off-by: Taeung Song Tested-by: Arnaldo Carvalho de Melo Cc: Martin Liška Cc: Milian Wolff Cc: Jiri Olsa Fixes: 0c4a5bcea460 ("perf annotate: Display total number of samples with --show-total-period") Link: http://lkml.kernel.org/r/1500500223-16753-1-git-send-email-treeze.taeung@gmail.com [ extracted from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index 680fff70f7a0..c382b1d8af42 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);