Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1587921 > unrolled thread
| Started by | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| First post | 2017-02-24 21:30 +0100 |
| Last post | 2017-02-28 11:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
perf test 'instruction decoder' failing Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-24 21:30 +0100
Re: perf test 'instruction decoder' failing Adrian Hunter <adrian.hunter@intel.com> - 2017-02-28 11:10 +0100
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-02-24 21:30 +0100 |
| Subject | perf test 'instruction decoder' failing |
| Message-ID | <teuF4-5q2-17@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Adrian Hunter <adrian.hunter@intel.com> |
|---|---|
| Date | 2017-02-28 11:10 +0100 |
| Message-ID | <tfMTf-2Zb-7@gated-at.bofh.it> |
| In reply to | #1587921 |
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;
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web