mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: perf test 'instruction decoder' failing
Date: Thu, 2 Mar 2017 09:03:35 +0200	[thread overview]
Message-ID: <a4266f68-7434-92b6-407e-6e6ab1bf70ed@intel.com> (raw)
In-Reply-To: <20170301145024.GC15145@kernel.org>

On 01/03/17 16:50, Arnaldo Carvalho de Melo wrote:
> Em Tue, Feb 28, 2017 at 12:02:36PM +0200, Adrian Hunter escreveu:
>> On 24/02/17 22:27, Arnaldo Carvalho de Melo wrote:
>>> Hi Adrian,
>>>
>>> 	This test is failing, I'll try to recheck this and bisect it,
>>> but since I haven't had the time so far and I saw it since yesterday (at
>>> least), lemme document it here:
>>>
>>>
>>> [root@jouet ~]# perf test -v 57
>>> 57: x86 instruction decoder - new instructions :
>>> --- start ---
>>> test child forked, pid 18975
>>> Decoded ok: 0f 31                	rdtsc  
>>> Decoded ok: 0f 1b 80 78 56 34 12 	bndstx %bnd0,0x12345678(%eax)
>>> <SNIP tons of OKays>
>>> Decoded ok: 0f 1b 85 78 56 34 12 	bndstx %bnd0,0x12345678(%ebp)
>>> Decoded ok: 0f 1b 84 01 78 56 34 12 	bndstx %bnd0,0x12345678(%ecx,%eax,1)
>>> Decoded ok: 0f 1b 84 05 78 56 34 12 	bndstx %bnd0,0x12345678(%ebp,%eax,1)
>>> Decoded ok: 0f 1b 84 08 78 56 34 12 	bndstx %bnd0,0x12345678(%eax,%ecx,1)
>>> Decoded ok: f2 e8 fc ff ff ff    	bnd call fce <main+0xfce>
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): f2 ff 10             	bnd call *(%eax)
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): f2 c3                	bnd ret 
>>> Decoded ok: f2 e9 fc ff ff ff    	bnd jmp fd9 <main+0xfd9>
>>> Decoded ok: f2 e9 fc ff ff ff    	bnd jmp fdf <main+0xfdf>
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): f2 ff 21             	bnd jmp *(%ecx)
>>> Decoded ok: f2 0f 85 fc ff ff ff 	bnd jne fe9 <main+0xfe9>
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 3a cc c1 00       	sha1rnds4 $0x0,%xmm1,%xmm0
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 3a cc d7 91       	sha1rnds4 $0x91,%xmm7,%xmm2
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 3a cc 00 91       	sha1rnds4 $0x91,(%eax),%xmm0
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 3a cc 05 78 56 34 12 91 	sha1rnds4 $0x91,0x12345678,%xmm0
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 3a cc 18 91       	sha1rnds4 $0x91,(%eax),%xmm3
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 3a cc 04 01 91    	sha1rnds4 $0x91,(%ecx,%eax,1),%xmm0
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 3a cc 04 05 78 56 34 12 91 	sha1rnds4 $0x91,0x12345678(,%eax,1),%xmm0
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 3a cc 04 08 91    	sha1rnds4 $0x91,(%eax,%ecx,1),%xmm0
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 3a cc 04 c8 91    	sha1rnds4 $0x91,(%eax,%ecx,8),%xmm0
>>> <SNIP lots of fails>
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 45 12          	bndstx %bnd0,0x12(%rbp)
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 44 01 12       	bndstx %bnd0,0x12(%rcx,%rax,1)
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 44 05 12       	bndstx %bnd0,0x12(%rbp,%rax,1)
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 44 08 12       	bndstx %bnd0,0x12(%rax,%rcx,1)
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 80 78 56 34 12 	bndstx %bnd0,0x12345678(%rax)
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 85 78 56 34 12 	bndstx %bnd0,0x12345678(%rbp)
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 84 01 78 56 34 12 	bndstx %bnd0,0x12345678(%rcx,%rax,1)
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 84 05 78 56 34 12 	bndstx %bnd0,0x12345678(%rbp,%rax,1)
>>> Failed to decode 'rel' value (0xfffffffc vs expected 0): 0f 1b 84 08 78 56 34 12 	bndstx %bnd0,0x12345678(%rax,%rcx,1)
>>> Decoded ok: f2 e8 00 00 00 00    	bnd callq f22 <main+0xf22>
>>> Decoded ok: 67 f2 ff 10          	bnd callq *(%eax)
>>> <SNIP lots of OKays>
>>> Decoded ok: 41 0f c7 9c c8 78 56 34 12 	xrstors 0x12345678(%r8,%rcx,8)
>>> Decoded ok: 0f 01 ee             	rdpkru
>>> Decoded ok: 0f 01 ef             	wrpkru
>>> test child finished with -1
>>> ---- end ----
>>> x86 instruction decoder - new instructions: FAILED!
>>>
>>> Fedora 25,
>>>
>>> [acme@jouet linux]$ uname -a
>>> Linux jouet 4.10.0-rc8 #2 SMP Wed Feb 15 15:26:36 BRT 2017 x86_64 x86_64 x86_64 GNU/Linux
>>>
>>> [acme@jouet linux]$ rpm -q binutils elfutils gcc glibc
>>> binutils-2.26.1-1.fc25.x86_64
>>> elfutils-0.168-1.fc25.x86_64
>>> gcc-6.3.1-1.fc25.x86_64
>>> glibc-2.24-4.fc25.x86_64
>>> glibc-2.24-4.fc25.i686
>>> [acme@jouet linux]$
>>>
>>> [acme@jouet linux]$ perf -v
>>> perf version 4.10.g264b77
>>>
>>> perf as in tip/perf/core and soon as in acme/perf/core
>>
>> There is missing initialization.  It only affects the test because it is checking 'rel' even in cases where there is no value.
>>
>> Here is the fix.
> 
> Thanks, I'll test it, I assume I can add your Signed-off-by: tag to this
> cset, ok? The comment I can just use your missing init comment above,

Yes thank you!

> 
> Thanks,
> 
> - Arnaldo
>  
>>
>> diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c
>> index 7913363bde5c..55b6250350d7 100644
>> --- a/tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c
>> +++ b/tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c
>> @@ -39,6 +39,8 @@ static void intel_pt_insn_decoder(struct insn *insn,
>>  	enum intel_pt_insn_branch branch = INTEL_PT_BR_NO_BRANCH;
>>  	int ext;
>>  
>> +	intel_pt_insn->rel = 0;
>> +
>>  	if (insn_is_avx(insn)) {
>>  		intel_pt_insn->op = INTEL_PT_OP_OTHER;
>>  		intel_pt_insn->branch = INTEL_PT_BR_NO_BRANCH;
>>
>>
> 

  reply	other threads:[~2017-03-02  7:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 20:27 Arnaldo Carvalho de Melo
2017-02-28 10:02 ` Adrian Hunter
2017-03-01 14:50   ` Arnaldo Carvalho de Melo
2017-03-02  7:03     ` Adrian Hunter [this message]
2017-03-07  8:19   ` [tip:perf/core] perf intel-PT/BTS: Add missing initialization tip-bot for Adrian Hunter

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=a4266f68-7434-92b6-407e-6e6ab1bf70ed@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /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®