aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-07-29 15:44:56 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-08-01 16:06:46 -0400
commit5cb725a9723aebb248106ff7f8c6c7253b24bbb1 (patch)
tree0196bf479c598964a6466cd5efed2e8744645094 /tools
parentce92834407a465c25c0be1a4a0339c625e44c4db (diff)
perf annotate: Rename symbol__annotate() to symbol__disassemble()
This function will not annotate anything, it will just disassembly the given map->dso and symbol. It currently does this by parsing the output of 'objdump --disassemble', but this could conceivably be done using a library or an offshot of the kernel's instruction decoder (arch/x86/lib/inat.c), etc. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-2xpfl4bfnrd6x584b390qok7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-top.c2
-rw-r--r--tools/perf/ui/browsers/annotate.c2
-rw-r--r--tools/perf/ui/gtk/annotate.c2
-rw-r--r--tools/perf/util/annotate.c4
-rw-r--r--tools/perf/util/annotate.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index bd108683fcb8..823dbbbf82a9 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -128,7 +128,7 @@ static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)
128 return err; 128 return err;
129 } 129 }
130 130
131 err = symbol__annotate(sym, map, 0); 131 err = symbol__disassemble(sym, map, 0);
132 if (err == 0) { 132 if (err == 0) {
133out_assign: 133out_assign:
134 top->sym_filter_entry = he; 134 top->sym_filter_entry = he;
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 29dc6d20364e..f4d6a8a962af 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -1050,7 +1050,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map,
1050 (nr_pcnt - 1); 1050 (nr_pcnt - 1);
1051 } 1051 }
1052 1052
1053 if (symbol__annotate(sym, map, sizeof_bdl) < 0) { 1053 if (symbol__disassemble(sym, map, sizeof_bdl) < 0) {
1054 ui__error("%s", ui_helpline__last_msg); 1054 ui__error("%s", ui_helpline__last_msg);
1055 goto out_free_offsets; 1055 goto out_free_offsets;
1056 } 1056 }
diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c
index 9c7ff8d31b27..35e4b9e28c8d 100644
--- a/tools/perf/ui/gtk/annotate.c
+++ b/tools/perf/ui/gtk/annotate.c
@@ -166,7 +166,7 @@ static int symbol__gtk_annotate(struct symbol *sym, struct map *map,
166 if (map->dso->annotate_warned) 166 if (map->dso->annotate_warned)
167 return -1; 167 return -1;
168 168
169 if (symbol__annotate(sym, map, 0) < 0) { 169 if (symbol__disassemble(sym, map, 0) < 0) {
170 ui__error("%s", ui_helpline__current); 170 ui__error("%s", ui_helpline__current);
171 return -1; 171 return -1;
172 } 172 }
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 2dd396a1f64b..4f47b6069197 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1123,7 +1123,7 @@ static void delete_last_nop(struct symbol *sym)
1123 } 1123 }
1124} 1124}
1125 1125
1126int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize) 1126int symbol__disassemble(struct symbol *sym, struct map *map, size_t privsize)
1127{ 1127{
1128 struct dso *dso = map->dso; 1128 struct dso *dso = map->dso;
1129 char *filename = dso__build_id_filename(dso, NULL, 0); 1129 char *filename = dso__build_id_filename(dso, NULL, 0);
@@ -1694,7 +1694,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map,
1694 struct rb_root source_line = RB_ROOT; 1694 struct rb_root source_line = RB_ROOT;
1695 u64 len; 1695 u64 len;
1696 1696
1697 if (symbol__annotate(sym, map, 0) < 0) 1697 if (symbol__disassemble(sym, map, 0) < 0)
1698 return -1; 1698 return -1;
1699 1699
1700 len = symbol__size(sym); 1700 len = symbol__size(sym);
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index a23084f54128..b0750d8bee1f 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -155,7 +155,7 @@ int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 addr);
155int symbol__alloc_hist(struct symbol *sym); 155int symbol__alloc_hist(struct symbol *sym);
156void symbol__annotate_zero_histograms(struct symbol *sym); 156void symbol__annotate_zero_histograms(struct symbol *sym);
157 157
158int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize); 158int symbol__disassemble(struct symbol *sym, struct map *map, size_t privsize);
159 159
160int symbol__annotate_init(struct map *map, struct symbol *sym); 160int symbol__annotate_init(struct map *map, struct symbol *sym);
161int symbol__annotate_printf(struct symbol *sym, struct map *map, 161int symbol__annotate_printf(struct symbol *sym, struct map *map,