aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/stdio/hist.c
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2017-10-09 16:32:55 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-10-24 08:59:55 -0400
commit2a704fc8db7b0080a67d9f4f4cb2a7bcaf79949d (patch)
tree4e16467b370c5cf684d2ffe84665a45367fd610a /tools/perf/ui/stdio/hist.c
parent9b7c85473cc2fa6fc4a7f87636ff2b69742b82b7 (diff)
perf report: Remove code to handle inline frames from browsers
The follow-up commits will make inline frames first-class citizens in the callchain, thereby obsoleting all of this special code. Signed-off-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Jiri Olsa <jolsa@redhat.com> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Yao Jin <yao.jin@linux.intel.com> Link: http://lkml.kernel.org/r/20171009203310.17362-2-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/stdio/hist.c')
-rw-r--r--tools/perf/ui/stdio/hist.c77
1 files changed, 1 insertions, 76 deletions
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index 8bdb7a500181..b6b9baac0e3b 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -21,64 +21,6 @@ static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin)
21 return ret; 21 return ret;
22} 22}
23 23
24static size_t inline__fprintf(struct map *map, u64 ip, int left_margin,
25 int depth, int depth_mask, FILE *fp)
26{
27 struct dso *dso;
28 struct inline_node *node;
29 struct inline_list *ilist;
30 int ret = 0, i;
31
32 if (map == NULL)
33 return 0;
34
35 dso = map->dso;
36 if (dso == NULL)
37 return 0;
38
39 node = dso__parse_addr_inlines(dso,
40 map__rip_2objdump(map, ip));
41 if (node == NULL)
42 return 0;
43
44 list_for_each_entry(ilist, &node->val, list) {
45 if ((ilist->filename != NULL) || (ilist->funcname != NULL)) {
46 ret += callchain__fprintf_left_margin(fp, left_margin);
47
48 for (i = 0; i < depth; i++) {
49 if (depth_mask & (1 << i))
50 ret += fprintf(fp, "|");
51 else
52 ret += fprintf(fp, " ");
53 ret += fprintf(fp, " ");
54 }
55
56 if (callchain_param.key == CCKEY_ADDRESS ||
57 callchain_param.key == CCKEY_SRCLINE) {
58 if (ilist->filename != NULL)
59 ret += fprintf(fp, "%s:%d (inline)",
60 ilist->filename,
61 ilist->line_nr);
62 else
63 ret += fprintf(fp, "??");
64 } else if (ilist->funcname != NULL)
65 ret += fprintf(fp, "%s (inline)",
66 ilist->funcname);
67 else if (ilist->filename != NULL)
68 ret += fprintf(fp, "%s:%d (inline)",
69 ilist->filename,
70 ilist->line_nr);
71 else
72 ret += fprintf(fp, "??");
73
74 ret += fprintf(fp, "\n");
75 }
76 }
77
78 inline_node__delete(node);
79 return ret;
80}
81
82static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask, 24static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask,
83 int left_margin) 25 int left_margin)
84{ 26{
@@ -137,9 +79,6 @@ static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_node *node,
137 fputc('\n', fp); 79 fputc('\n', fp);
138 free(alloc_str); 80 free(alloc_str);
139 81
140 if (symbol_conf.inline_name)
141 ret += inline__fprintf(chain->ms.map, chain->ip,
142 left_margin, depth, depth_mask, fp);
143 return ret; 82 return ret;
144} 83}
145 84
@@ -314,13 +253,6 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
314 253
315 if (++entries_printed == callchain_param.print_limit) 254 if (++entries_printed == callchain_param.print_limit)
316 break; 255 break;
317
318 if (symbol_conf.inline_name)
319 ret += inline__fprintf(chain->ms.map,
320 chain->ip,
321 left_margin,
322 0, 0,
323 fp);
324 } 256 }
325 root = &cnode->rb_root; 257 root = &cnode->rb_root;
326 } 258 }
@@ -600,7 +532,6 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size,
600{ 532{
601 int ret; 533 int ret;
602 int callchain_ret = 0; 534 int callchain_ret = 0;
603 int inline_ret = 0;
604 struct perf_hpp hpp = { 535 struct perf_hpp hpp = {
605 .buf = bf, 536 .buf = bf,
606 .size = size, 537 .size = size,
@@ -622,13 +553,7 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size,
622 callchain_ret = hist_entry_callchain__fprintf(he, total_period, 553 callchain_ret = hist_entry_callchain__fprintf(he, total_period,
623 0, fp); 554 0, fp);
624 555
625 if (callchain_ret == 0 && symbol_conf.inline_name) { 556 ret += callchain_ret;
626 inline_ret = inline__fprintf(he->ms.map, he->ip, 0, 0, 0, fp);
627 ret += inline_ret;
628 if (inline_ret > 0)
629 ret += fprintf(fp, "\n");
630 } else
631 ret += callchain_ret;
632 557
633 return ret; 558 return ret;
634} 559}