All of lore.kernel.org
 help / color / mirror / Atom feed
* perf test 'instruction decoder' failing
@ 2017-02-24 20:27 Arnaldo Carvalho de Melo
  2017-02-28 10:02 ` Adrian Hunter
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-02-24 20:27 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Jiri Olsa, Namhyung Kim, David Ahern, Linux Kernel Mailing List

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

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: perf test 'instruction decoder' failing
  2017-02-24 20:27 perf test 'instruction decoder' failing Arnaldo Carvalho de Melo
@ 2017-02-28 10:02 ` Adrian Hunter
  2017-03-01 14:50   ` Arnaldo Carvalho de Melo
  2017-03-07  8:19   ` [tip:perf/core] perf intel-PT/BTS: Add missing initialization tip-bot for Adrian Hunter
  0 siblings, 2 replies; 5+ messages in thread
From: Adrian Hunter @ 2017-02-28 10:02 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, David Ahern, Linux Kernel Mailing List

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.


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;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: perf test 'instruction decoder' failing
  2017-02-28 10:02 ` Adrian Hunter
@ 2017-03-01 14:50   ` Arnaldo Carvalho de Melo
  2017-03-02  7:03     ` Adrian Hunter
  2017-03-07  8:19   ` [tip:perf/core] perf intel-PT/BTS: Add missing initialization tip-bot for Adrian Hunter
  1 sibling, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-03-01 14:50 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Jiri Olsa, Namhyung Kim, David Ahern, Linux Kernel Mailing List

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,

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;
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: perf test 'instruction decoder' failing
  2017-03-01 14:50   ` Arnaldo Carvalho de Melo
@ 2017-03-02  7:03     ` Adrian Hunter
  0 siblings, 0 replies; 5+ messages in thread
From: Adrian Hunter @ 2017-03-02  7:03 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, David Ahern, Linux Kernel Mailing List

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;
>>
>>
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip:perf/core] perf intel-PT/BTS: Add missing initialization
  2017-02-28 10:02 ` Adrian Hunter
  2017-03-01 14:50   ` Arnaldo Carvalho de Melo
@ 2017-03-07  8:19   ` tip-bot for Adrian Hunter
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Adrian Hunter @ 2017-03-07  8:19 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: jolsa, hpa, linux-kernel, dsahern, acme, mingo, namhyung,
	adrian.hunter, tglx

Commit-ID:  f1c4d1ad39b5f7c617572f93658bb7159ec9c686
Gitweb:     http://git.kernel.org/tip/f1c4d1ad39b5f7c617572f93658bb7159ec9c686
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Tue, 28 Feb 2017 12:02:36 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 3 Mar 2017 19:07:18 -0300

perf intel-PT/BTS: Add missing initialization

  $ perf test decoder
  57: x86 instruction decoder - new instructions : FAILED!
  $

  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)

There is missing initialization.  It only affects the test because it is
checking 'rel' even in cases where there is no value.

Fix it.

Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/08c6ad07-7994-3e56-b20e-d75727ca7765@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c | 2 ++
 1 file changed, 2 insertions(+)

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 7913363..55b6250 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;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-07  8:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-24 20:27 perf test 'instruction decoder' failing 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
2017-03-07  8:19   ` [tip:perf/core] perf intel-PT/BTS: Add missing initialization tip-bot for Adrian Hunter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.