From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
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: Wed, 1 Mar 2017 11:50:24 -0300 [thread overview]
Message-ID: <20170301145024.GC15145@kernel.org> (raw)
In-Reply-To: <08c6ad07-7994-3e56-b20e-d75727ca7765@intel.com>
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;
>
>
next prev parent reply other threads:[~2017-03-01 14:50 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 [this message]
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
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=20170301145024.GC15145@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--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
Powered by JetHome