Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754091AbdG3Jnb (ORCPT ); Sun, 30 Jul 2017 05:43:31 -0400 Received: from terminus.zytor.com ([65.50.211.136]:47221 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751151AbdG3Jn1 (ORCPT ); Sun, 30 Jul 2017 05:43:27 -0400 Date: Sun, 30 Jul 2017 02:41:09 -0700 From: tip-bot for Taeung Song Message-ID: Cc: jolsa@redhat.com, acme@redhat.com, mliska@suse.cz, linux-kernel@vger.kernel.org, mingo@kernel.org, namhyung@kernel.org, milian.wolff@kdab.com, hpa@zytor.com, tglx@linutronix.de, treeze.taeung@gmail.com Reply-To: jolsa@redhat.com, acme@redhat.com, mliska@suse.cz, linux-kernel@vger.kernel.org, mingo@kernel.org, namhyung@kernel.org, treeze.taeung@gmail.com, tglx@linutronix.de, hpa@zytor.com, milian.wolff@kdab.com In-Reply-To: <1500500223-16753-1-git-send-email-treeze.taeung@gmail.com> References: <1500500223-16753-1-git-send-email-treeze.taeung@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf annotate TUI: Fix --show-total-period Git-Commit-ID: 29dc267f270a4ad5ae1341e7fdc8539ac7dc907a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1666 Lines: 38 Commit-ID: 29dc267f270a4ad5ae1341e7fdc8539ac7dc907a Gitweb: http://git.kernel.org/tip/29dc267f270a4ad5ae1341e7fdc8539ac7dc907a Author: Taeung Song AuthorDate: Thu, 27 Jul 2017 11:33:20 -0300 Committer: Arnaldo Carvalho de Melo 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 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 --- 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);