"Test object code reading" failing, debug messages don't help
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
Em Mon, Nov 11, 2013 at 04:51:17PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 11 lines
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
Em Mon, Nov 11, 2013 at 04:55:59PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 9 lines
Em Mon, Nov 11, 2013 at 04:51:17PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 8 lines
Hi Adrian,
I have perf test failing here:
[root@ssdandy ~]# perf test 21
21: Test object code reading : FAILED!
[root@ssdandy ~]#
Quoted 6 lines
Quoted 3 lines
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
Adrian Hunter
reviewerQuoted 20 lines · Arnaldo Carvalho de Melo
Em Mon, Nov 11, 2013 at 04:55:59PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 9 lines
Em Mon, Nov 11, 2013 at 04:51:17PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 8 lines
Hi Adrian,
I have perf test failing here:
[root@ssdandy ~]# perf test 21
21: Test object code reading : FAILED!
[root@ssdandy ~]#Quoted 6 lines
Quoted 3 lines
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:
Quoted 7 lines
[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 <[email protected]>
Subject: [PATCH] perf tests: Handle throttle events in 'object code reading' test
Unhandled events cause an error that fails the test
--- tools/perf/tests/code-reading.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
tools/perf/tests/code-reading.c +13 -2
@@ -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 ; }
Signature · 1 line
1.7.11.7
tip-bot for Adrian Hunter
merge bot[tip:perf/urgent] perf tests: Handle throttle events in ' object code reading' test
perf tests: Handle throttle events in 'object code reading' test
Commit-ID: 48095b721ca54ffa70427185c00473530f4aef06 Gitweb: http://git.kernel.org/tip/48095b721ca54ffa70427185c00473530f4aef06 Author: Adrian Hunter <[email protected]> AuthorDate: Tue, 12 Nov 2013 09:59:33 +0200 Committer: Arnaldo Carvalho de Melo <[email protected]> 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.
--- tools/perf/tests/code-reading.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
tools/perf/tests/code-reading.c +13 -2
@@ -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 ; }