Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698131

[PATCH v4 4/9] perf annotate browser: Show the proper header when using --show-total-period

From Taeung Song <treeze.taeung@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v4 4/9] perf annotate browser: Show the proper header when using --show-total-period
Date 2017-07-27 18:20 +0200
Message-ID <u7TG1-8lQ-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Currently a first column is only "Percent",
so fix it to show correct column name based on given options.
(e.g. if using --show-total-period or a 't' hotkey,
show "Event count" as a first column)

Reported-by: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
 tools/perf/ui/browsers/annotate.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 87b0395..9fd4413 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -165,8 +165,12 @@ 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");
+		else  {
+			if (annotate_browser__opts.show_total_period)
+				ui_browser__printf(browser, "%*s", 11, "Event count");
+			else
+				ui_browser__printf(browser, "%*s", 7, "Percent");
+		}
 	}
 	if (ab->have_cycles) {
 		if (dl->ipc)
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v4 4/9] perf annotate browser: Show the proper header when using --show-total-period Taeung Song <treeze.taeung@gmail.com> - 2017-07-27 18:20 +0200
  [tip:perf/core] perf annotate TUI: Fix column header when toggling  period/percent tip-bot for Taeung Song <tipbot@zytor.com> - 2017-07-30 11:50 +0200

csiph-web