File perf-annotate-tui-fix-show-total-period.patch of Package perf
42
1
From: Taeung Song <treeze.taeung@gmail.com>
2
Date: Thu, 27 Jul 2017 11:33:20 -0300
3
Subject: perf annotate TUI: Fix --show-total-period
4
MIME-Version: 1.0
5
Content-Type: text/plain; charset=UTF-8
6
Content-Transfer-Encoding: 8bit
7
Git-commit: 29dc267f270a4ad5ae1341e7fdc8539ac7dc907a
8
Patch-mainline: v4.14-rc1
9
References: bsc#1070010 (git-fixes - dependency)
10
Signed-off-By: Tony Jones <tonyj@suse.de>
11
12
We were showing the number of samples, not the total period, fix it.
13
14
Reported-by: Namhyung Kim <namhyung@kernel.org>
15
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
16
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
17
Cc: Martin Liška <mliska@suse.cz>
18
Cc: Milian Wolff <milian.wolff@kdab.com>
19
Cc: Jiri Olsa <jolsa@redhat.com>
20
Fixes: 0c4a5bcea460 ("perf annotate: Display total number of samples with --show-total-period")
21
Link: http://lkml.kernel.org/r/1500500223-16753-1-git-send-email-treeze.taeung@gmail.com
22
[ extracted from a larger patch ]
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 680fff70f7a0..c382b1d8af42 100644
30
--- a/tools/perf/ui/browsers/annotate.c
31
+++ b/tools/perf/ui/browsers/annotate.c
32
33
current_entry);
34
if (annotate_browser__opts.show_total_period) {
35
ui_browser__printf(browser, "%6" PRIu64 " ",
36
- bdl->samples[i].he.nr_samples);
37
+ bdl->samples[i].he.period);
38
} else {
39
ui_browser__printf(browser, "%6.2f ",
40
bdl->samples[i].percent);
41
42