perf annotate: Don't pipe objdump output through 'expand' command
authorIan Rogers <irogers@google.com>
Thu, 10 Oct 2019 18:36:48 +0000 (11:36 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Oct 2019 11:39:42 +0000 (08:39 -0300)
commitb34b45eef16d814a93a52f2e76db803bb38939a0
tree2388e094c0cc7a0e927d1f4d4d20c061c89fb011
parent7a675de428364a16038a8e6ed557daf0a009ce9c
perf annotate: Don't pipe objdump output through 'expand' command

Avoiding a pipe allows objdump command failures to surface.  Move to the
caller of symbol__parse_objdump_line the call to strim that removes
leading and trailing tabs.  Add a new expand_tabs function that if a tab
is present allocate a new line in which tabs are expanded.  In
symbol__parse_objdump_line the line had no leading spaces, so simplify
the line_ip processing.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: clang-built-linux@googlegroups.com
Link: http://lore.kernel.org/lkml/20191010183649.23768-5-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/annotate.c