]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
perf annotate: Rename symbol__annotate() to symbol__disassemble()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 29 Jul 2016 19:44:56 +0000 (16:44 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 1 Aug 2016 20:06:46 +0000 (17:06 -0300)
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>
tools/perf/builtin-top.c
tools/perf/ui/browsers/annotate.c
tools/perf/ui/gtk/annotate.c
tools/perf/util/annotate.c
tools/perf/util/annotate.h

index bd108683fcb87d30a45bda771f2ad665c59723cf..823dbbbf82a9c7b267d024559a45edb29e9e09a7 100644 (file)
@@ -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;
index 29dc6d20364e8420d148e3006d50fabeffd13e24..f4d6a8a962afd403c72954abbf8e54e9ce3c6dbd 100644 (file)
@@ -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;
        }
index 9c7ff8d31b274e32d22147664cb622437db514f1..35e4b9e28c8d32d5ca6f4960c9b0b500b2ee01d6 100644 (file)
@@ -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;
        }
index 2dd396a1f64b974ccc09cde134c8c0e80eb8fd76..4f47b6069197d6361809ae66388cdaf85e65d245 100644 (file)
@@ -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);
index a23084f54128ee10b55d959bff99c66c3e0fecba..b0750d8bee1ffd8787294c7aa79ad79d723887a9 100644 (file)
@@ -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,