File perf-annotate-stdio-fix-column-header-when-using-show-total-period.patch of Package perf
39
1
From: Taeung Song <treeze.taeung@gmail.com>
2
Date: Tue, 25 Jul 2017 06:28:42 +0900
3
Subject: perf annotate stdio: Fix column header when using --show-total-period
4
Git-commit: 38d2dcd0ccf85b55d783edbfc14fd8dea4d55b73
5
Patch-mainline: v4.14-rc1
6
References: bsc#1070010 (git-fixes - dependency)
7
Signed-off-By: Tony Jones <tonyj@suse.de>
8
9
Currently the first column header is always "Percent", fix it to show
10
correct column name based on given options, i.e. if using
11
--show-total-period, show "Event count" as a first column.
12
13
Reported-by: Milian Wolff <milian.wolff@kdab.com>
14
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
15
Cc: Jiri Olsa <jolsa@redhat.com>
16
Cc: Namhyung Kim <namhyung@kernel.org>
17
Link: http://lkml.kernel.org/r/c3c902e7-95bc-16d4-366f-12eb034c5c8d@gmail.com
18
[ Extracted from a larger patch ]
19
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
20
---
21
tools/perf/util/annotate.c | 3 ++-
22
1 file changed, 2 insertions(+), 1 deletion(-)
23
24
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
25
index 004072f82511..c2b4b00166ed 100644
26
--- a/tools/perf/util/annotate.c
27
+++ b/tools/perf/util/annotate.c
28
29
width *= evsel->nr_members;
30
31
graph_dotted_len = printf(" %-*.*s| Source code & Disassembly of %s for %s (%" PRIu64 " samples)\n",
32
- width, width, "Percent", d_filename, evsel_name, h->nr_samples);
33
+ width, width, symbol_conf.show_total_period ? "Event count" : "Percent",
34
+ d_filename, evsel_name, h->nr_samples);
35
36
printf("%-*.*s----\n",
37
graph_dotted_len, graph_dotted_len, graph_dotted_line);
38
39