Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1659142
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 01/11] perf annotate: Fix failure when filename has special chars |
| Date | 2017-06-06 21:30 +0200 |
| Message-ID | <tPskY-4zc-61@gated-at.bofh.it> (permalink) |
| References | <tPskW-4zc-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
When filename contains special chars, perf annotate fails
with an error:
$ perf annotate --vmlinux ./vmlinux\(test\) --stdio native_safe_halt
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `objdump --start-address=0xffffffff8184e840
--stop-address=0xffffffff8184e848 -l -d --no-show-raw -S -C
./vmlinux(test) 2>/dev/null|grep -v ./vmlinux(test):|expand'
Fix it by surrounding filename in double quotes.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Adam Stylinski <adam.stylinski@etegent.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Taeung Song <treeze.taeung@gmail.com>
Link: http://lkml.kernel.org/r/20170505101417.2117-1-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/annotate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 683f8340460c..07d5608a675f 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1429,7 +1429,7 @@ int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_na
snprintf(command, sizeof(command),
"%s %s%s --start-address=0x%016" PRIx64
" --stop-address=0x%016" PRIx64
- " -l -d %s %s -C %s 2>/dev/null|grep -v %s:|expand",
+ " -l -d %s %s -C \"%s\" 2>/dev/null|grep -v \"%s:\"|expand",
objdump_path ? objdump_path : "objdump",
disassembler_style ? "-M " : "",
disassembler_style ? disassembler_style : "",
--
2.9.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/11] perf/urgent fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-06 21:30 +0200 [PATCH 11/11] perf report: Ensure the perf DSO mapping matches what libdw sees Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-06 21:30 +0200 [PATCH 01/11] perf annotate: Fix failure when filename has special chars Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-06 21:30 +0200 [PATCH 05/11] perf header: Set proper module name when build-id event found Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-06 21:30 +0200 [PATCH 06/11] perf symbols: Set module info when build-id event found Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-06 21:30 +0200 [PATCH 08/11] perf test: Disable breakpoint signal tests for powerpc Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-06 21:30 +0200 Re: [GIT PULL 00/11] perf/urgent fixes Ingo Molnar <mingo@kernel.org> - 2017-06-07 18:00 +0200
csiph-web