perf annotate: Rename symbol__annotate() to symbol__disassemble()
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 5cb725a9723aebb248106ff7f8c6c7253b24bbb1 Gitweb: http://git.kernel.org/tip/5cb725a9723aebb248106ff7f8c6c7253b24bbb1 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 29 Jul 2016 16:44:56 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 1 Aug 2016 17:06:46 -0300
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 <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-top.c | 2 +- tools/perf/ui/browsers/annotate.c | 2 +- tools/perf/ui/gtk/annotate.c | 2 +- tools/perf/util/annotate.c | 4 ++-- tools/perf/util/annotate.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)
tools/perf/builtin-top.c +1 -1
@@ -128,7 +128,7 @@ static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)return err; } - err =symbol__annotate (sym, map,0 ); + err =symbol__disassemble (sym, map,0 );if (err ==0 ) { out_assign: top->sym_filter_entry = he;
tools/perf/ui/browsers/annotate.c +1 -1
@@ -1050,7 +1050,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, (nr_pcnt -1 ); } -if (symbol__annotate (sym, map, sizeof_bdl) <0 ) { +if (symbol__disassemble (sym, map, sizeof_bdl) <0 ) {ui__error ("%s" , ui_helpline__last_msg); goto out_free_offsets; }
tools/perf/ui/gtk/annotate.c +1 -1
@@ -166,7 +166,7 @@ static int symbol__gtk_annotate(struct symbol *sym, struct map *map,if (map->dso->annotate_warned)return -1 ; -if (symbol__annotate (sym, map,0 ) <0 ) { +if (symbol__disassemble (sym, map,0 ) <0 ) {ui__error ("%s" , ui_helpline__current);return -1 ; }
tools/perf/util/annotate.c +2 -2
@@ -1123,7 +1123,7 @@ static void delete_last_nop(struct symbol *sym) } } -int symbol__annotate (struct symbol *sym,struct map *map,size_t privsize) +int symbol__disassemble (struct symbol *sym,struct map *map,size_t privsize) {struct dso *dso = map->dso;char *filename =dso__build_id_filename (dso,NULL ,0 );
@@ -1694,7 +1694,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map,struct rb_root source_line =RB_ROOT ;u64 len; -if (symbol__annotate (sym, map,0 ) <0 ) +if (symbol__disassemble (sym, map,0 ) <0 )return -1 ; len =symbol__size (sym);
tools/perf/util/annotate.h +1 -1
@@ -155,7 +155,7 @@ int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 addr);int symbol__alloc_hist (struct symbol *sym);void symbol__annotate_zero_histograms (struct symbol *sym); -int symbol__annotate (struct symbol *sym,struct map *map,size_t privsize); +int symbol__disassemble (struct symbol *sym,struct map *map,size_t privsize);int symbol__annotate_init (struct map *map,struct symbol *sym); int symbol__annotate_printf(struct symbol *sym, struct map *map,