From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17407 invoked by alias); 27 Feb 2013 07:59:46 -0000 Received: (qmail 17394 invoked by uid 22791); 27 Feb 2013 07:59:44 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Feb 2013 07:59:32 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1R7xUBx031234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 27 Feb 2013 02:59:30 -0500 Received: from host2.jankratochvil.net (ovpn-116-19.ams2.redhat.com [10.36.116.19]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1R7xQTa026545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 27 Feb 2013 02:59:29 -0500 Date: Wed, 27 Feb 2013 07:59:00 -0000 From: Jan Kratochvil To: markus.t.metzger@intel.com Cc: gdb-patches@sourceware.org, markus.t.metzger@gmail.com Subject: Re: [PATCH 2/3] record-btrace, disas: omit pc prefix Message-ID: <20130227075925.GA5003@host2.jankratochvil.net> References: <1361808917-16934-1-git-send-email-markus.t.metzger@intel.com> <1361808917-16934-3-git-send-email-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1361808917-16934-3-git-send-email-markus.t.metzger@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00678.txt.bz2 On Mon, 25 Feb 2013 17:15:16 +0100, markus.t.metzger@intel.com wrote: > From: Markus Metzger > > Add a disassembly flag to omit the pc prefix and use it in the "record > instruction-history" command of record-btrace. > > The pc prefix would appear multiple times in the branch trace disassembly, > which is more confusing than helpful. I do not see it, moreover I find the output better without this patch: with the patch: (gdb) record instruction-history warning: Recorded trace may be corrupted. warning: Recorded trace may be corrupted. warning: Recorded trace may be corrupted. 0x00007ffff62fe56a <_int_malloc+298>: add $0xa8,%rsp 0x00007ffff62fe571 <_int_malloc+305>: mov %r12,%rax 0x00007ffff62fe574 <_int_malloc+308>: pop %rbx 0x00007ffff62fe575 <_int_malloc+309>: pop %rbp 0x00007ffff62fe576 <_int_malloc+310>: pop %r12 0x00007ffff62fe578 <_int_malloc+312>: pop %r13 0x00007ffff62fe57a <_int_malloc+314>: pop %r14 0x00007ffff62fe57c <_int_malloc+316>: pop %r15 0x00007ffff62fe57e <_int_malloc+318>: retq 0x00007ffff6300ecc <__GI___libc_malloc+92>: test %rax,%rax (gdb) p/x $pc $1 = 0x7ffff6300ecc without the patch: (gdb) record instruction-history 0x00007ffff6303f51 : mov %rax,0x0(%rbp) 0x00007ffff6303f55 : pop %rbx 0x00007ffff6303f56 : pop %rbp 0x00007ffff6303f57 : pop %r12 0x00007ffff6303f59 : pop %r13 0x00007ffff6303f5b : pop %r14 0x00007ffff6303f5d : retq 0x00007ffff62c8921 <_IO_vfprintf_internal+257>: mov %r12,%rdi 0x00007ffff62c8924 <_IO_vfprintf_internal+260>: callq 0x7ffff62a03d0 => 0x00007ffff62a03d0 : jmpq *0x399c9a(%rip) # 0x7ffff663a070 (gdb) p/x $pc $1 = 0x7ffff62a03d0 It seems to me like the preference of "=> " or not "=> " is not related to "record instruction-history". If you do like disassemblies more without "=> " it can be made some new global option unrelated to "record". > 2013-02-25 Markus Metzger > > * record-btrace.c (btrace_insn_history): Omit the pc prefix in > the instruction history disassembly. > * disasm.c (dump_insns): Omit the pc prefix, if requested. > * disasm.h (DISASSEMBLY_OMIT_PC): New. Thanks, Jan