projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e30437
)
perf annotate: Fix failure when filename has special chars
author
Ravi Bangoria
<
[email protected]
>
Fri, 5 May 2017 10:14:17 +0000
(15:44 +0530)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Sat, 27 May 2017 13:10:18 +0000
(10:10 -0300)
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 <
[email protected]
>
Cc: Adam Stylinski <
[email protected]
>
Cc: Alexander Shishkin <
[email protected]
>
Cc: Christian Borntraeger <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Taeung Song <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/util/annotate.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/annotate.c
b/tools/perf/util/annotate.c
index 683f8340460c1777f82f35860b3bb581a07f222a..07d5608a675f5bd0698533b3bbf724039f3f660b 100644
(file)
--- 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 : "",