Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752998AbbLSDEn (ORCPT ); Fri, 18 Dec 2015 22:04:43 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:43183 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752698AbbLSDEl (ORCPT ); Fri, 18 Dec 2015 22:04:41 -0500 Message-ID: <5674C935.7010009@huawei.com> Date: Sat, 19 Dec 2015 11:04:21 +0800 From: xiakaixu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Jan Stancek CC: Jiri Olsa , adrian hunter , Arnaldo Carvalho de Melo , Ingo Molnar , masami hiramatsu pt , , "Wangnan (F)" Subject: Re: [BUG] perf test 21("Test object code reading") failure on ARM64 References: <56729F77.20404@huawei.com> <20151217120926.GA15303@krava.brq.redhat.com> <1065837169.29712806.1450355053836.JavaMail.zimbra@redhat.com> In-Reply-To: <1065837169.29712806.1450355053836.JavaMail.zimbra@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.101.23] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.5674C942.00A1,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 67b41022b56e6cc8d59dcf1f2b21e94c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3540 Lines: 109 >>> ... > > Hi, > > What is your objdump version? Hi, Sorry for the late reply. # objdump --version GNU objdump (GNU Binutils) 2.25. I am sure that the system is Little endian. > >>> >>> 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 > > The data appears to match, but the endian is different. > > Regards, > Jan > >>> >>> 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 >>> >> > > . > -- Regards Kaixu Xia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/