From: Peter Zijlstra <peterz@infradead.org>
To: Jan Stancek <jstancek@redhat.com>
Cc: linux-kernel@vger.kernel.org, acme@kernel.org, jolsa@kernel.org,
adrian.hunter@intel.com, dsahern@gmail.com,
cjashfor@linux.vnet.ibm.com, fweisbec@gmail.com,
mingo@kernel.org, namhyung@kernel.org, paulus@samba.org
Subject: Re: [PATCH] perf tests: improve reading of objdump output
Date: Mon, 31 Aug 2015 09:22:59 +0200 [thread overview]
Message-ID: <20150831072259.GH19282@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <30eb4d33ffec3edca37daf6f6fe668c0136430e0.1441005281.git.jstancek@redhat.com>
On Mon, Aug 31, 2015 at 09:18:33AM +0200, Jan Stancek wrote:
> There are couple of situations, where objdump output doesn't
> match "code reading" test expectations:
>
> 1. gaps in output, objdump skips zero blocks by default
>
> ffffffff816704fe <sysret_check+0x4b>:
> ffffffff816704fe: 7b 34 jnp ffffffff81670534 <sysret_signal+0x1c>
> ...
> ffffffff81670501 <sysret_careful>:
> ffffffff81670501: 0f ba e2 03 bt $0x3,%edx
> ffffffff81670505: 73 11 jae ffffffff81670518 <sysret_signal>
>
> This patch adds "-z" to objdump parameters.
>
> 2. bytes can be repeated in objdump output, test reads it all sequentially
> assuming each address is represented in output only once.
>
> ffffffff8164efb3 <retint_swapgs+0x9>:
> ffffffff8164efb3: c1 5d 00 eb rcrl $0xeb,0x0(%rbp)
> ffffffff8164efb7: 00 4c 8b 5c add %cl,0x5c(%rbx,%rcx,4)
>
> ffffffff8164efb8 <restore_c_regs_and_iret>:
> ffffffff8164efb8: 4c 8b 5c 24 30 mov 0x30(%rsp),%r11
> ffffffff8164efbd: 4c 8b 54 24 38 mov 0x38(%rsp),%r10
>
> This patch stores objdump output to buffer according to address
> on each line.
>
> 3. objdump output can span across multiple sections
>
> Disassembly of section .text:
> 0000000000000008 <crc32c+0x8>:
> 8: 48 89 e5 mov %rsp,%rbp
> b: 53 push %rbx
> c: 8b 01 mov (%rcx),%eax
> <snip>
> 6b: 90 nop
>
> Disassembly of section .init.text:
> 0000000000000008 <init_module+0x8>:
> 8: 00 00 add %al,(%rax)
> a: 00 00 add %al,(%rax)
> c: 48 89 e5
>
> This patch aborts further reading if address starts going backwards,
> assuming we crossed sections.
I would have expected 3 patches, each patch doing exactly one of the
above.
prev parent reply other threads:[~2015-08-31 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-31 7:18 Jan Stancek
2015-08-31 7:22 ` Peter Zijlstra [this message]
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=20150831072259.GH19282@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@kernel.org \
--cc=jstancek@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=paulus@samba.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