Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753964AbdG3JoF (ORCPT ); Sun, 30 Jul 2017 05:44:05 -0400 Received: from terminus.zytor.com ([65.50.211.136]:56111 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbdG3JoE (ORCPT ); Sun, 30 Jul 2017 05:44:04 -0400 Date: Sun, 30 Jul 2017 02:41:49 -0700 From: tip-bot for Taeung Song Message-ID: Cc: acme@redhat.com, tglx@linutronix.de, mingo@kernel.org, dsahern@gmail.com, wangnan0@huawei.com, jolsa@kernel.org, hpa@zytor.com, adrian.hunter@intel.com, treeze.taeung@gmail.com, namhyung@kernel.org, linux-kernel@vger.kernel.org Reply-To: wangnan0@huawei.com, dsahern@gmail.com, mingo@kernel.org, tglx@linutronix.de, acme@redhat.com, linux-kernel@vger.kernel.org, namhyung@kernel.org, treeze.taeung@gmail.com, hpa@zytor.com, adrian.hunter@intel.com, jolsa@kernel.org In-Reply-To: <1501172169-6761-1-git-send-email-treeze.taeung@gmail.com> References: <1501172169-6761-1-git-send-email-treeze.taeung@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf annotate TUI: Fix column header when toggling period/percent Git-Commit-ID: f67d395c6e3895c3c8c67c8f7523f6a94d61a82d 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: 1799 Lines: 41 Commit-ID: f67d395c6e3895c3c8c67c8f7523f6a94d61a82d Gitweb: http://git.kernel.org/tip/f67d395c6e3895c3c8c67c8f7523f6a94d61a82d Author: Taeung Song AuthorDate: Fri, 28 Jul 2017 12:04:32 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 28 Jul 2017 12:53:08 -0300 perf annotate TUI: Fix column header when toggling period/percent We have the 't' hotkey to toggle showing either the total period or the percentage of samples for a given line, but we forgot to toggle as well the column header, always showing "Percent", even when showing the period, fix it. Signed-off-by: Taeung Song Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1501172169-6761-1-git-send-email-treeze.taeung@gmail.com [ Extracted from a larger patch, s/Event count/Period/g ] 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 0f4bcc0..46f297a 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c @@ -166,7 +166,7 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int if (!show_title) ui_browser__write_nstring(browser, " ", pcnt_width); else - ui_browser__printf(browser, "%*s", 7, "Percent"); + ui_browser__printf(browser, "%*s", 7, annotate_browser__opts.show_total_period ? "Period" : "Percent"); } if (ab->have_cycles) { if (dl->ipc)