perf annotate: Fix failure when filename has special chars
authorRavi Bangoria <[email protected]>
Fri, 5 May 2017 10:14:17 +0000 (15:44 +0530)
committerArnaldo Carvalho de Melo <[email protected]>
Sat, 27 May 2017 13:10:18 +0000 (10:10 -0300)
commit7b4500bc519686712471924972022df88b12ff93
treeaa08525226bff77efc2c5125f8d10cdf05029f7f
parent6e30437bd42c4d4e9cfc4c40efda00eb83a11cde
perf annotate: Fix failure when filename has special chars

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