File perf-annotate-tui-use-sym_hist_entry-in-disasm_line_samples.patch of Package perf
57
1
From: Arnaldo Carvalho de Melo <acme@redhat.com>
2
Date: Thu, 27 Jul 2017 11:24:59 -0300
3
Subject: perf annotate TUI: Use sym_hist_entry in disasm_line_samples
4
Git-commit: bb79a232b0881ce47f921a53f40612a9f9996482
5
Patch-mainline: v4.14-rc1
6
References: bsc#1070010 (git-fixes - dependency)
7
Signed-off-By: Tony Jones <tonyj@suse.de>
8
9
Just paving the way to fix --show-total-period in the TUI, i.e. now
10
we save in struct disasm_line_samples not just the number of samples,
11
but also the total period.
12
13
Based-on-a-patch-by: Taeung Song <treeze.taeung@gmail.com>
14
Cc: Jiri Olsa <jolsa@redhat.com>
15
Cc: Milian Wolff <milian.wolff@kdab.com>
16
Cc: Namhyung Kim <namhyung@kernel.org>
17
Link: http://lkml.kernel.org/n/tip-1sup5hkwrxocjvrmrmhs732o@git.kernel.org
18
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
19
---
20
tools/perf/ui/browsers/annotate.c | 8 ++++----
21
1 file changed, 4 insertions(+), 4 deletions(-)
22
23
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
24
index dbe4e630b90f..680fff70f7a0 100644
25
--- a/tools/perf/ui/browsers/annotate.c
26
+++ b/tools/perf/ui/browsers/annotate.c
27
28
#include <sys/ttydefaults.h>
29
30
struct disasm_line_samples {
31
- double percent;
32
- u64 nr;
33
+ double percent;
34
+ struct sym_hist_entry he;
35
};
36
37
#define IPC_WIDTH 6
38
39
current_entry);
40
if (annotate_browser__opts.show_total_period) {
41
ui_browser__printf(browser, "%6" PRIu64 " ",
42
- bdl->samples[i].nr);
43
+ bdl->samples[i].he.nr_samples);
44
} else {
45
ui_browser__printf(browser, "%6.2f ",
46
bdl->samples[i].percent);
47
48
pos->offset,
49
next ? next->offset : len,
50
&path, &sample);
51
- bpos->samples[i].nr = sample.nr_samples;
52
+ bpos->samples[i].he = sample;
53
54
if (max_percent < bpos->samples[i].percent)
55
max_percent = bpos->samples[i].percent;
56
57