File perf-annotate-stdio-fix-show-total-period.patch of Package perf
43
1
From: Taeung Song <treeze.taeung@gmail.com>
2
Date: Fri, 21 Jul 2017 11:58:20 -0300
3
Subject: perf annotate stdio: Fix --show-total-period
4
MIME-Version: 1.0
5
Content-Type: text/plain; charset=UTF-8
6
Content-Transfer-Encoding: 8bit
7
References: git-fixes (depedent)
8
Signed-off-By: Tony Jones <tonyj@suse.de>
9
Git-commit: 585d93c5ffccced26689e34095c0d74ef20a07d6
10
Patch-mainline: v4.14-rc1
11
References: bsc#1070010 (git-fixes - dependency)
12
Signed-off-By: Tony Jones <tonyj@suse.de>
13
14
We were showing the total number of samples, not the total period as
15
asked by the user, fix it.
16
17
Reported-by: Namhyung Kim <namhyung@kernel.org>
18
Cc: Jiri Olsa <jolsa@redhat.com>
19
Cc: Martin Liška <mliska@suse.cz>
20
Cc: Milian Wolff <milian.wolff@kdab.com>
21
Link: http://lkml.kernel.org/n/tip-lh2nh89rtqn5x5vbfthw6qml@git.kernel.org
22
Fixes: 0c4a5bcea460 ("perf annotate: Display total number of samples with --show-total-period")
23
[ split from a larger patch ]
24
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
25
---
26
tools/perf/util/annotate.c | 2 +-
27
1 file changed, 1 insertion(+), 1 deletion(-)
28
29
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
30
index 00e085fc945b..004072f82511 100644
31
--- a/tools/perf/util/annotate.c
32
+++ b/tools/perf/util/annotate.c
33
34
35
if (symbol_conf.show_total_period)
36
color_fprintf(stdout, color, " %7" PRIu64,
37
- sample.nr_samples);
38
+ sample.period);
39
else
40
color_fprintf(stdout, color, " %7.2f", percent);
41
}
42
43