Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1724021 > unrolled thread
| Started by | Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> |
|---|---|
| First post | 2017-08-31 11:20 +0200 |
| Last post | 2017-09-05 07:30 +0200 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH v2] perf test powerpc: Fix 'Object code reading' test Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-08-31 11:20 +0200
Re: [PATCH v2] perf test powerpc: Fix 'Object code reading' test Adrian Hunter <adrian.hunter@intel.com> - 2017-08-31 11:30 +0200
Re: [PATCH v2] perf test powerpc: Fix 'Object code reading' test Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-31 18:40 +0200
[tip:perf/urgent] perf test powerpc: Fix 'Object code reading' test tip-bot for Ravi Bangoria <tipbot@zytor.com> - 2017-09-05 07:30 +0200
| From | Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-08-31 11:20 +0200 |
| Subject | [PATCH v2] perf test powerpc: Fix 'Object code reading' test |
| Message-ID | <uktNL-3Kz-3@gated-at.bofh.it> |
'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>
---
Changes in v2:
- Add pr_debug()
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;
}
--
1.8.3.1
[toc] | [next] | [standalone]
| From | Adrian Hunter <adrian.hunter@intel.com> |
|---|---|
| Date | 2017-08-31 11:30 +0200 |
| Message-ID | <uktXt-3NS-29@gated-at.bofh.it> |
| In reply to | #1724021 |
On 31/08/17 12:14, Ravi Bangoria wrote:
> '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>
> ---
> Changes in v2:
> - Add pr_debug()
>
> 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;
> }
>
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-08-31 18:40 +0200 |
| Message-ID | <ukAFz-7XG-3@gated-at.bofh.it> |
| In reply to | #1724030 |
Em Thu, Aug 31, 2017 at 12:15:29PM +0300, Adrian Hunter escreveu:
> On 31/08/17 12:14, Ravi Bangoria wrote:
> > '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>
Thanks, applied.
- Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Ravi Bangoria <tipbot@zytor.com> |
|---|---|
| Date | 2017-09-05 07:30 +0200 |
| Subject | [tip:perf/urgent] perf test powerpc: Fix 'Object code reading' test |
| Message-ID | <umeAW-70c-35@gated-at.bofh.it> |
| In reply to | #1724021 |
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;
}
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web