Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752192AbbHaHXJ (ORCPT ); Mon, 31 Aug 2015 03:23:09 -0400 Received: from casper.infradead.org ([85.118.1.10]:39713 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbbHaHXI (ORCPT ); Mon, 31 Aug 2015 03:23:08 -0400 Date: Mon, 31 Aug 2015 09:22:59 +0200 From: Peter Zijlstra To: Jan Stancek 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 Message-ID: <20150831072259.GH19282@twins.programming.kicks-ass.net> References: <30eb4d33ffec3edca37daf6f6fe668c0136430e0.1441005281.git.jstancek@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30eb4d33ffec3edca37daf6f6fe668c0136430e0.1441005281.git.jstancek@redhat.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2209 Lines: 55 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 : > ffffffff816704fe: 7b 34 jnp ffffffff81670534 > ... > ffffffff81670501 : > ffffffff81670501: 0f ba e2 03 bt $0x3,%edx > ffffffff81670505: 73 11 jae ffffffff81670518 > > 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 : > ffffffff8164efb3: c1 5d 00 eb rcrl $0xeb,0x0(%rbp) > ffffffff8164efb7: 00 4c 8b 5c add %cl,0x5c(%rbx,%rcx,4) > > ffffffff8164efb8 : > 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 : > 8: 48 89 e5 mov %rsp,%rbp > b: 53 push %rbx > c: 8b 01 mov (%rcx),%eax > > 6b: 90 nop > > Disassembly of section .init.text: > 0000000000000008 : > 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/