From: tip-bot for Ravi Bangoria <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, namhyung@kernel.org, jolsa@kernel.org,
tglx@linutronix.de, acme@redhat.com, mingo@kernel.org,
ravi.bangoria@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
mpe@ellerman.id.au, alexander.shishkin@linux.intel.com,
adrian.hunter@intel.com, hpa@zytor.com
Subject: [tip:perf/urgent] perf test powerpc: Fix 'Object code reading' test
Date: Mon, 4 Sep 2017 22:20:14 -0700 [thread overview]
Message-ID: <tip-9a805d8648ee09c136130fe4114a09574bc0b1ef@git.kernel.org> (raw)
In-Reply-To: <1504170896-7876-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com>
Commit-ID: 9a805d8648ee09c136130fe4114a09574bc0b1ef
Gitweb: http://git.kernel.org/tip/9a805d8648ee09c136130fe4114a09574bc0b1ef
Author: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
AuthorDate: Thu, 31 Aug 2017 14:44:56 +0530
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 1 Sep 2017 14:45:59 -0300
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 <ravi.bangoria@linux.vnet.ibm.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxppc-dev@lists.ozlabs.org
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 <acme@redhat.com>
---
tools/perf/tests/code-reading.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 761c5a4..466a462 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -237,6 +237,11 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
thread__find_addr_map(thread, cpumode, MAP__FUNCTION, addr, &al);
if (!al.map || !al.map->dso) {
+ if (cpumode == PERF_RECORD_MISC_HYPERVISOR) {
+ pr_debug("Hypervisor address can not be resolved - skipping\n");
+ return 0;
+ }
+
pr_debug("thread__find_addr_map failed\n");
return -1;
}
prev parent reply other threads:[~2017-09-05 5:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 9:14 [PATCH v2] perf test powerpc: Fix 'Object code reading' test Ravi Bangoria
2017-08-31 9:15 ` Adrian Hunter
2017-08-31 16:31 ` Arnaldo Carvalho de Melo
2017-09-05 5:20 ` tip-bot for Ravi Bangoria [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-9a805d8648ee09c136130fe4114a09574bc0b1ef@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox