This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH 2/3] record-btrace, disas: omit pc prefix


> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Wednesday, February 27, 2013 8:59 AM
> To: Metzger, Markus T
> Cc: gdb-patches@sourceware.org; markus.t.metzger@gmail.com
> Subject: Re: [PATCH 2/3] record-btrace, disas: omit pc prefix
> 
> On Mon, 25 Feb 2013 17:15:16 +0100, markus.t.metzger@intel.com wrote:
> > From: Markus Metzger <markus.t.metzger@intel.com>
> >
> > 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:

Within a loop, you will see repeating => very frequently.

(gdb) rec inst -
   0x00000000004006ec <_ZL4loopPv+8>:	mov    0x200955(%rip),%rax        # 0x601048 <_ZL6shared>
=> 0x00000000004006f3 <_ZL4loopPv+15>:	add    $0x1,%rax
   0x00000000004006f7 <_ZL4loopPv+19>:	mov    %rax,0x20094a(%rip)        # 0x601048 <_ZL6shared>
   0x00000000004006fe <_ZL4loopPv+26>:	jmp    0x4006ec <_ZL4loopPv+8>
   0x00000000004006ec <_ZL4loopPv+8>:	mov    0x200955(%rip),%rax        # 0x601048 <_ZL6shared>
=> 0x00000000004006f3 <_ZL4loopPv+15>:	add    $0x1,%rax
   0x00000000004006f7 <_ZL4loopPv+19>:	mov    %rax,0x20094a(%rip)        # 0x601048 <_ZL6shared>
   0x00000000004006fe <_ZL4loopPv+26>:	jmp    0x4006ec <_ZL4loopPv+8>
   0x00000000004006ec <_ZL4loopPv+8>:	mov    0x200955(%rip),%rax        # 0x601048 <_ZL6shared>
=> 0x00000000004006f3 <_ZL4loopPv+15>:	add    $0x1,%rax
(gdb)

[...]

> (gdb) record instruction-history
> warning: Recorded trace may be corrupted.
> warning: Recorded trace may be corrupted.
> warning: Recorded trace may be corrupted.

That's unexpected. If you can reproduce this, would you please send
me the reproducer so I can have a look at it?

[...]

Thanks,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]