perf test powerpc: Fix 'Object code reading' test
authorRavi Bangoria <[email protected]>
Thu, 31 Aug 2017 09:14:56 +0000 (14:44 +0530)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 1 Sep 2017 17:45:59 +0000 (14:45 -0300)
commit9a805d8648ee09c136130fe4114a09574bc0b1ef
treeeb8d5f1e30955b31f62793a84b71429c94b7af24
parent27702bcfe8a125a1feeeb5f07526d63b20cac47f
perf test powerpc: Fix 'Object code reading' test

'Object code reading' test always fails on powerpc guest. Two reasons
for the failure are:

1. When elf section is too big (size beyond 'unsigned int' max value).
objdump fails to disassemble from such section. This was fixed with
commit 0f6329bd7fc ("binutils/objdump: Fix disassemble for huge elf
sections") in binutils.

2. When the sample is from hypervisor. Hypervisor symbols can not be
resolved within guest and thus thread__find_addr_map() fails for such
symbols. Fix this by ignoring hypervisor symbols in the test.

Signed-off-by: Ravi Bangoria <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/1504170896-7876-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/tests/code-reading.c