perf annotate: Fix failure when filename has special chars
authorRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Fri, 5 May 2017 10:14:17 +0000 (15:44 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
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 <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