* "Test object code reading" failing, debug messages don't help
@ 2013-11-11 19:51 Arnaldo Carvalho de Melo
2013-11-11 19:55 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 19:51 UTC (permalink / raw)
To: Adrian Hunter
Cc: David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
Paul Mackerras, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
linux-kernel
Hi Adrian,
I have perf test failing here:
[root@ssdandy ~]# perf test 21
21: Test object code reading : FAILED!
[root@ssdandy ~]#
Try it with -v, but all messages, except for that elf header, which I
assume is for a previous entry that is not suitable and should not be
considered, seems to say all is well, except that the test fails :-\
[root@ssdandy ~]# perf test -v 21
21: Test object code reading :
--- start ---
Looking at the vmlinux_path (6 entries long)
symsrc__init: cannot get elf header.
Using /lib/modules/3.12.0-rc6+/build/vmlinux for symbols
Parsing event 'cycles'
mmap size 528384B
Reading object code for memory address: 0xffffffff8101d2ad
File is: /lib/modules/3.12.0-rc6+/build/vmlinux
On file address is: 0x21d2ad
Objdump command is: objdump -d --start-address=0xffffffff8101d2ad --stop-address=0xffffffff8101d32d /lib/modules/3.12.0-rc6+/build/vmlinux
Bytes read match those read by objdump
Reading object code for memory address: 0xffffffff8101d2ad
File is: /lib/modules/3.12.0-rc6+/build/vmlinux
On file address is: 0x21d2ad
Objdump command is: objdump -d --start-address=0xffffffff8101d2ad --stop-address=0xffffffff8101d32d /lib/modules/3.12.0-rc6+/build/vmlinux
Bytes read match those read by objdump
Reading object code for memory address: 0xffffffff8101d2ad
File is: /lib/modules/3.12.0-rc6+/build/vmlinux
On file address is: 0x21d2ad
Objdump command is: objdump -d --start-address=0xffffffff8101d2ad --stop-address=0xffffffff8101d32d /lib/modules/3.12.0-rc6+/build/vmlinux
Bytes read match those read by objdump
Reading object code for memory address: 0xffffffff8101d2ad
File is: /lib/modules/3.12.0-rc6+/build/vmlinux
On file address is: 0x21d2ad
Objdump command is: objdump -d --start-address=0xffffffff8101d2ad --stop-address=0xffffffff8101d32d /lib/modules/3.12.0-rc6+/build/vmlinux
Bytes read match those read by objdump
Reading object code for memory address: 0xffffffff8101d2ad
File is: /lib/modules/3.12.0-rc6+/build/vmlinux
On file address is: 0x21d2ad
Objdump command is: objdump -d --start-address=0xffffffff8101d2ad --stop-address=0xffffffff8101d32d /lib/modules/3.12.0-rc6+/build/vmlinux
Bytes read match those read by objdump
Reading object code for memory address: 0xffffffff81124ae5
File is: /lib/modules/3.12.0-rc6+/build/vmlinux
On file address is: 0x324ae5
Objdump command is: objdump -d --start-address=0xffffffff81124ae5 --stop-address=0xffffffff81124b65 /lib/modules/3.12.0-rc6+/build/vmlinux
Bytes read match those read by objdump
---- end ----
Test object code reading: FAILED!
[root@ssdandy ~]#
Can you try this on acme/perf/core? And improve the debug messages, if
possible?
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "Test object code reading" failing, debug messages don't help
2013-11-11 19:51 "Test object code reading" failing, debug messages don't help Arnaldo Carvalho de Melo
@ 2013-11-11 19:55 ` Arnaldo Carvalho de Melo
2013-11-11 19:58 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 19:55 UTC (permalink / raw)
To: Adrian Hunter
Cc: David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
Paul Mackerras, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
linux-kernel
Em Mon, Nov 11, 2013 at 04:51:17PM -0300, Arnaldo Carvalho de Melo escreveu:
> Hi Adrian,
>
> I have perf test failing here:
>
> [root@ssdandy ~]# perf test 21
> 21: Test object code reading : FAILED!
> [root@ssdandy ~]#
>
> Try it with -v, but all messages, except for that elf header, which I
> assume is for a previous entry that is not suitable and should not be
> considered, seems to say all is well, except that the test fails :-\
If I try gdb on test__code_reading, go on stepping thru it to try to
figure out why it fails, it works :-\
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "Test object code reading" failing, debug messages don't help
2013-11-11 19:55 ` Arnaldo Carvalho de Melo
@ 2013-11-11 19:58 ` Arnaldo Carvalho de Melo
2013-11-12 7:59 ` Adrian Hunter
0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-11-11 19:58 UTC (permalink / raw)
To: Adrian Hunter
Cc: David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
Paul Mackerras, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
linux-kernel
Em Mon, Nov 11, 2013 at 04:55:59PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Nov 11, 2013 at 04:51:17PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Hi Adrian,
> >
> > I have perf test failing here:
> >
> > [root@ssdandy ~]# perf test 21
> > 21: Test object code reading : FAILED!
> > [root@ssdandy ~]#
> >
> > Try it with -v, but all messages, except for that elf header, which I
> > assume is for a previous entry that is not suitable and should not be
> > considered, seems to say all is well, except that the test fails :-\
>
> If I try gdb on test__code_reading, go on stepping thru it to try to
> figure out why it fails, it works :-\
Why this is so is still unclear, but since the other problem I had was
due to the kernel reducing the max sample_freq, I tried:
[root@ssdandy ~]# echo 10000 > /proc/sys/kernel/perf_event_max_sample_rate
[root@ssdandy ~]# perf test 21
21: Test object code reading : Ok
[root@ssdandy ~]# echo 7000 > /proc/sys/kernel/perf_event_max_sample_rate
[root@ssdandy ~]# perf test 21
21: Test object code reading : FAILED!
[root@ssdandy ~]#
Checking where in this test the sample_freq is set...
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "Test object code reading" failing, debug messages don't help
2013-11-11 19:58 ` Arnaldo Carvalho de Melo
@ 2013-11-12 7:59 ` Adrian Hunter
2013-11-12 21:57 ` [tip:perf/urgent] perf tests: Handle throttle events in ' object code reading' test tip-bot for Adrian Hunter
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Hunter @ 2013-11-12 7:59 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: David Ahern, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
Paul Mackerras, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
linux-kernel
On 11/11/13 21:58, Arnaldo Carvalho de Melo wrote:
> Em Mon, Nov 11, 2013 at 04:55:59PM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Mon, Nov 11, 2013 at 04:51:17PM -0300, Arnaldo Carvalho de Melo escreveu:
>>> Hi Adrian,
>>>
>>> I have perf test failing here:
>>>
>>> [root@ssdandy ~]# perf test 21
>>> 21: Test object code reading : FAILED!
>>> [root@ssdandy ~]#
>>>
>>> Try it with -v, but all messages, except for that elf header, which I
>>> assume is for a previous entry that is not suitable and should not be
>>> considered, seems to say all is well, except that the test fails :-\
>>
>> If I try gdb on test__code_reading, go on stepping thru it to try to
>> figure out why it fails, it works :-\
>
> Why this is so is still unclear, but since the other problem I had was
> due to the kernel reducing the max sample_freq, I tried:
>
> [root@ssdandy ~]# echo 10000 > /proc/sys/kernel/perf_event_max_sample_rate
> [root@ssdandy ~]# perf test 21
> 21: Test object code reading : Ok
> [root@ssdandy ~]# echo 7000 > /proc/sys/kernel/perf_event_max_sample_rate
> [root@ssdandy ~]# perf test 21
> 21: Test object code reading : FAILED!
> [root@ssdandy ~]#
From: Adrian Hunter <adrian.hunter@intel.com>
Subject: [PATCH] perf tests: Handle throttle events in 'object code reading' test
Unhandled events cause an error that fails the test
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/tests/code-reading.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 6d9dc19..85d4919 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -275,8 +275,19 @@ static int process_event(struct machine *machine, struct perf_evlist *evlist,
if (event->header.type == PERF_RECORD_SAMPLE)
return process_sample_event(machine, evlist, event, state);
- if (event->header.type < PERF_RECORD_MAX)
- return machine__process_event(machine, event, NULL);
+ if (event->header.type == PERF_RECORD_THROTTLE ||
+ event->header.type == PERF_RECORD_UNTHROTTLE)
+ return 0;
+
+ if (event->header.type < PERF_RECORD_MAX) {
+ int ret;
+
+ ret = machine__process_event(machine, event, NULL);
+ if (ret < 0)
+ pr_debug("machine__process_event failed, event type %u\n",
+ event->header.type);
+ return ret;
+ }
return 0;
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip:perf/urgent] perf tests: Handle throttle events in ' object code reading' test
2013-11-12 7:59 ` Adrian Hunter
@ 2013-11-12 21:57 ` tip-bot for Adrian Hunter
0 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Adrian Hunter @ 2013-11-12 21:57 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, eranian, paulus, hpa, mingo, peterz, efault,
acme, namhyung, jolsa, fweisbec, adrian.hunter, dsahern, tglx
Commit-ID: 48095b721ca54ffa70427185c00473530f4aef06
Gitweb: http://git.kernel.org/tip/48095b721ca54ffa70427185c00473530f4aef06
Author: Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Tue, 12 Nov 2013 09:59:33 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 12 Nov 2013 16:37:54 -0300
perf tests: Handle throttle events in 'object code reading' test
Unhandled events cause an error that fails the test, fix it.
Reported-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/5281DFE5.3000909@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/code-reading.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 6d9dc19..85d4919 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -275,8 +275,19 @@ static int process_event(struct machine *machine, struct perf_evlist *evlist,
if (event->header.type == PERF_RECORD_SAMPLE)
return process_sample_event(machine, evlist, event, state);
- if (event->header.type < PERF_RECORD_MAX)
- return machine__process_event(machine, event, NULL);
+ if (event->header.type == PERF_RECORD_THROTTLE ||
+ event->header.type == PERF_RECORD_UNTHROTTLE)
+ return 0;
+
+ if (event->header.type < PERF_RECORD_MAX) {
+ int ret;
+
+ ret = machine__process_event(machine, event, NULL);
+ if (ret < 0)
+ pr_debug("machine__process_event failed, event type %u\n",
+ event->header.type);
+ return ret;
+ }
return 0;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-11-12 21:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11 19:51 "Test object code reading" failing, debug messages don't help Arnaldo Carvalho de Melo
2013-11-11 19:55 ` Arnaldo Carvalho de Melo
2013-11-11 19:58 ` Arnaldo Carvalho de Melo
2013-11-12 7:59 ` Adrian Hunter
2013-11-12 21:57 ` [tip:perf/urgent] perf tests: Handle throttle events in ' object code reading' test tip-bot for Adrian Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).