Re: [PATCH 5/5] perf annotate: fix objdump --no-show-raw-insn flag

Arnaldo Carvalho de Melo
2019-10-14T14:24:29Z

Em Thu, Oct 10, 2019 at 11:36:49AM -0700, Ian Rogers escreveu:
> Remove redirection of objdump's stderr to /dev/null to help diagnose
> failures.
> Fix the '--no-show-raw' flag to be '--no-show-raw-insn' which binutils
> is permissive and allows, but fails with LLVM objdump.

Thanks, applied.

- Arnaldo

> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/util/annotate.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> index 3d5b9236576a..2a71c90a4921 100644
> --- a/tools/perf/util/annotate.c
> +++ b/tools/perf/util/annotate.c
> @@ -1944,13 +1944,13 @@ static int symbol__disassemble(struct symbol *sym, struct annotate_args *args)
> err = asprintf(&command,
> "%s %s%s --start-address=0x%016" PRIx64
> " --stop-address=0x%016" PRIx64
> - " -l -d %s %s -C \"$1\" 2>/dev/null",
> + " -l -d %s %s -C \"$1\"",
> opts->objdump_path ?: "objdump",
> opts->disassembler_style ? "-M " : "",
> opts->disassembler_style ?: "",
> map__rip_2objdump(map, sym->start),
> map__rip_2objdump(map, sym->end),
> - opts->show_asm_raw ? "" : "--no-show-raw",
> + opts->show_asm_raw ? "" : "--no-show-raw-insn",
> opts->annotate_src ? "-S" : "");
>
> if (err < 0) {
> --
> 2.23.0.581.g78d2f28ef7-goog

--

- Arnaldo