Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+6 -6
+1 -1
tools/perf/builtin-top.c
··· 128 128 return err; 129 129 } 130 130 131 - err = symbol__annotate(sym, map, 0); 131 + err = symbol__disassemble(sym, map, 0); 132 132 if (err == 0) { 133 133 out_assign: 134 134 top->sym_filter_entry = he;
+1 -1
tools/perf/ui/browsers/annotate.c
··· 1050 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 1054 ui__error("%s", ui_helpline__last_msg); 1055 1055 goto out_free_offsets; 1056 1056 }
+1 -1
tools/perf/ui/gtk/annotate.c
··· 166 166 if (map->dso->annotate_warned) 167 167 return -1; 168 168 169 - if (symbol__annotate(sym, map, 0) < 0) { 169 + if (symbol__disassemble(sym, map, 0) < 0) { 170 170 ui__error("%s", ui_helpline__current); 171 171 return -1; 172 172 }
+2 -2
tools/perf/util/annotate.c
··· 1123 1123 } 1124 1124 } 1125 1125 1126 - int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize) 1126 + int symbol__disassemble(struct symbol *sym, struct map *map, size_t privsize) 1127 1127 { 1128 1128 struct dso *dso = map->dso; 1129 1129 char *filename = dso__build_id_filename(dso, NULL, 0); ··· 1694 1694 struct rb_root source_line = RB_ROOT; 1695 1695 u64 len; 1696 1696 1697 - if (symbol__annotate(sym, map, 0) < 0) 1697 + if (symbol__disassemble(sym, map, 0) < 0) 1698 1698 return -1; 1699 1699 1700 1700 len = symbol__size(sym);
+1 -1
tools/perf/util/annotate.h
··· 155 155 int symbol__alloc_hist(struct symbol *sym); 156 156 void symbol__annotate_zero_histograms(struct symbol *sym); 157 157 158 - int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize); 158 + int symbol__disassemble(struct symbol *sym, struct map *map, size_t privsize); 159 159 160 160 int symbol__annotate_init(struct map *map, struct symbol *sym); 161 161 int symbol__annotate_printf(struct symbol *sym, struct map *map,