mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: xiakaixu <xiakaixu@huawei.com>
Cc: adrian.hunter@intel.com,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	masami.hiramatsu.pt@hitachi.com, linux-kernel@vger.kernel.org,
	"Wangnan (F)" <wangnan0@huawei.com>,
	Jan Stancek <jstancek@redhat.com>
Subject: Re: [BUG] perf test 21("Test object code reading") failure on ARM64
Date: Thu, 17 Dec 2015 13:09:26 +0100	[thread overview]
Message-ID: <20151217120926.GA15303@krava.brq.redhat.com> (raw)
In-Reply-To: <56729F77.20404@huawei.com>

adding Jan Stancek to the loop

jirka

On Thu, Dec 17, 2015 at 07:41:43PM +0800, xiakaixu wrote:
> Hi,
> 
> Perf test "Test object code reading" failed on ARM64 board and the test log is here.
> 
> ######################################################################################
> # perf test -v 21
>   ...
>   File is: /tmp/oxygen_root-root/lib64/libc-2.19-2014.08.so
>   On file address is: 0x70c3c
>   Objdump command is: objdump -z -d --start-address=0x70c3c --stop-address=0x70cbc /tmp/oxygen_root-root/lib64/libc-2.19-2014.08.so
>   objdump read too few bytes
>   Bytes read differ from those read by objdump
>   buf1 (dso):
>   0x16 0x58 0x41 0xb9 0xf6 0x0e 0x00 0x35 0x00 0x00 0x00 0x90 0xbf 0x27 0x00 0xf9
>   0x00 0x40 0x22 0x91 0xa0 0x23 0x00 0xf9 0xb4 0x06 0x00 0xf0 0x55 0xd0 0x3b 0xd5
>   0x80 0xe2 0x14 0x91 0xb5 0xc2 0x1b 0xd1 0x00 0x60 0x00 0x91 0x01 0x04 0x40 0xf9
>   0x3f 0x00 0x15 0xeb 0xc0 0x01 0x00 0x54 0xbf 0x3f 0x00 0xb9 0x21 0x00 0x80 0x52
>   0x02 0xfc 0x5f 0x88 0x5f 0x00 0x1f 0x6b 0x61 0x00 0x00 0x54 0x01 0x7c 0x03 0x88
>   0x83 0xff 0xff 0x35 0x40 0x00 0x00 0x54 0xa2 0x3f 0x00 0xb9 0xa0 0x3f 0x40 0xb9
>   0xc0 0x0f 0x00 0x35 0x80 0xe2 0x14 0x91 0x15 0x10 0x00 0xf9 0x80 0xe2 0x14 0x91
>   0x62 0x02 0x40 0xb9 0x44 0x00 0x11 0x12 0x01 0x1c 0x40 0xb9 0x13 0x08 0x00 0xf9
> 
>   buf2 (objdump):
>   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> 
>   test child finished with -1
>   ---- end ----
>   Test object code reading: FAILED!
> ######################################################################################
> 
> The result of objdump on ARM64 like this:
>    ...
>    70c40:	35000ef6 	cbnz	w22, 70e1c <_IO_link_in+0x208>
>    70c44:	90000000 	adrp	x0, 70000 <_IO_file_fopen+0x164>
>    70c48:	f90027bf 	str	xzr, [x29,#72]
>    70c4c:	91224000 	add	x0, x0, #0x890
>    70c50:	f90023a0 	str	x0, [x29,#64]
>    70c54:	f00006b4 	adrp	x20, 147000 <__abort_msg+0x588>
>    ...
> 
> So the following patch is needed.
> diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
> index a767a64..1b55fa0 100644
> --- a/tools/perf/tests/code-reading.c
> +++ b/tools/perf/tests/code-reading.c
> @@ -61,9 +61,6 @@ static size_t read_objdump_line(const char *line, size_t line_len, void *buf,
>                 if (i >= line_len || !isxdigit(line[i]))
>                         break;
>                 c2 = line[i++];
> -               /* Followed by a space */
> -               if (i < line_len && line[i] && !isspace(line[i]))
> -                       break;
>                 /* Store byte */
>                 *(unsigned char *)buf = (hex(c1) << 4) | hex(c2);
>                buf += 1;
> 
> After applying this patch, the test still failed.
> ######################################################################################
>   ...
>   Objdump command is: objdump -z -d --start-address=0x7c4c4 --stop-address=0x7c544 /tmp/oxygen_root-root/lib64/libc-2.19-2014.08.so
>   Bytes read differ from those read by objdump
>   buf1 (dso):
>   0x00 0x00 0x80 0xd2 0xd5 0xff 0xff 0x17 0xe0 0x03 0x19 0xaa 0xd3 0xff 0xff 0x17
>   0xe1 0x03 0x14 0xaa 0xa2 0x63 0x02 0x91 0xe0 0x03 0x13 0xaa 0x66 0xfe 0xff 0x97
>   0xfc 0x03 0x00 0xaa 0xa0 0x4f 0x40 0xf9 0xe2 0x03 0x1c 0xaa 0xe1 0x03 0x00 0xaa
>   0x08 0x00 0x67 0x9e 0x61 0x02 0x01 0x8b 0xe0 0x03 0x13 0xaa 0x60 0x01 0x00 0x94
>   0xe0 0xf9 0xff 0x35 0x95 0x07 0x00 0xd1 0x1b 0x00 0x80 0xd2 0x01 0x01 0x66 0x9e
>   0x60 0x02 0x15 0x8b 0x17 0x00 0x1c 0xcb 0xf8 0x03 0x1b 0xaa 0x0a 0x00 0x67 0x9e
>   0x20 0x00 0x80 0xd2 0x00 0x00 0x1c 0xcb 0x81 0x02 0x01 0xcb 0x09 0x00 0x67 0x9e
>   0x2b 0x00 0x67 0x9e 0x16 0x03 0x14 0x8b 0x20 0x03 0x1a 0x8b 0x01 0x00 0x80 0x52
> 
>   buf2 (objdump):
>   0xd2 0x80 0x00 0x00 0x17 0xff 0xff 0xd5 0xaa 0x19 0x03 0xe0 0x17 0xff 0xff 0xd3
>   0xaa 0x14 0x03 0xe1 0x91 0x02 0x63 0xa2 0xaa 0x13 0x03 0xe0 0x97 0xff 0xfe 0x66
>   0xaa 0x00 0x03 0xfc 0xf9 0x40 0x4f 0xa0 0xaa 0x1c 0x03 0xe2 0xaa 0x00 0x03 0xe1
>   0x9e 0x67 0x00 0x08 0x8b 0x01 0x02 0x61 0xaa 0x13 0x03 0xe0 0x94 0x00 0x01 0x60
>   0x35 0xff 0xf9 0xe0 0xd1 0x00 0x07 0x95 0xd2 0x80 0x00 0x1b 0x9e 0x66 0x01 0x01
>   0x8b 0x15 0x02 0x60 0xcb 0x1c 0x00 0x17 0xaa 0x1b 0x03 0xf8 0x9e 0x67 0x00 0x0a
>   0xd2 0x80 0x00 0x20 0xcb 0x1c 0x00 0x00 0xcb 0x01 0x02 0x81 0x9e 0x67 0x00 0x09
>   0x9e 0x67 0x00 0x2b 0x8b 0x14 0x03 0x16 0x8b 0x1a 0x03 0x20 0x52 0x80 0x00 0x01
> 
>   test child finished with -1
>   ---- end ----
>   Test object code reading: FAILED!
> ######################################################################################
> 
> Seems the dso file format is different between x86 and ARM64.
> Maybe this test case only works fine on x86.
> -- 
> Regards
> Kaixu Xia
> 

  reply	other threads:[~2015-12-17 12:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 11:41 xiakaixu
2015-12-17 12:09 ` Jiri Olsa [this message]
2015-12-17 12:24   ` Jan Stancek
2015-12-19  3:04     ` xiakaixu
2015-12-20  0:25       ` Jan Stancek
2015-12-21  2:18         ` xiakaixu
2016-01-07 16:27           ` Arnaldo Carvalho de Melo
2016-01-08  8:03             ` Jan Stancek
2016-01-08 12:52               ` Arnaldo Carvalho de Melo

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=20151217120926.GA15303@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=jstancek@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=wangnan0@huawei.com \
    --cc=xiakaixu@huawei.com \
    /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

all inboxes | Powered by JetHome®