File perf-annotate-tui-fix-column-header-when-toggling-period-percent.patch of Package perf
42
1
From: Taeung Song <treeze.taeung@gmail.com>
2
Date: Fri, 28 Jul 2017 12:04:32 -0300
3
Subject: perf annotate TUI: Fix column header when toggling period/percent
4
Git-commit: f67d395c6e3895c3c8c67c8f7523f6a94d61a82d
5
Patch-mainline: v4.14-rc1
6
References: bsc#1070010 (git-fixes - dependency)
7
Signed-off-By: Tony Jones <tonyj@suse.de>
8
9
We have the 't' hotkey to toggle showing either the total period or the
10
percentage of samples for a given line, but we forgot to toggle as well
11
the column header, always showing "Percent", even when showing the
12
period, fix it.
13
14
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
15
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
16
Cc: Adrian Hunter <adrian.hunter@intel.com>
17
Cc: David Ahern <dsahern@gmail.com>
18
Cc: Jiri Olsa <jolsa@kernel.org>
19
Cc: Namhyung Kim <namhyung@kernel.org>
20
Cc: Wang Nan <wangnan0@huawei.com>
21
Link: http://lkml.kernel.org/r/1501172169-6761-1-git-send-email-treeze.taeung@gmail.com
22
[ Extracted from a larger patch, s/Event count/Period/g ]
23
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
24
---
25
tools/perf/ui/browsers/annotate.c | 2 +-
26
1 file changed, 1 insertion(+), 1 deletion(-)
27
28
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
29
index 0f4bcc0d140c..46f297a4e94b 100644
30
--- a/tools/perf/ui/browsers/annotate.c
31
+++ b/tools/perf/ui/browsers/annotate.c
32
33
if (!show_title)
34
ui_browser__write_nstring(browser, " ", pcnt_width);
35
else
36
- ui_browser__printf(browser, "%*s", 7, "Percent");
37
+ ui_browser__printf(browser, "%*s", 7, annotate_browser__opts.show_total_period ? "Period" : "Percent");
38
}
39
if (ab->have_cycles) {
40
if (dl->ipc)
41
42