Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1216057
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf tests: improve reading of objdump output |
| Date | 2015-08-31 09:30 +0200 |
| Message-ID | <q3rHs-T1-9@gated-at.bofh.it> (permalink) |
| References | <q3rxL-HI-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] perf tests: improve reading of objdump output Jan Stancek <jstancek@redhat.com> - 2015-08-31 09:20 +0200 Re: [PATCH] perf tests: improve reading of objdump output Peter Zijlstra <peterz@infradead.org> - 2015-08-31 09:30 +0200
csiph-web