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 v4 00/13] branch tracing support for Atom


> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Jan Kratochvil
> Sent: Tuesday, November 27, 2012 2:11 PM
> To: Metzger, Markus T
> Cc: gdb-patches@sourceware.org; markus.t.metzger@gmail.com; palves@redhat.com; tromey@redhat.com; kettenis@gnu.org
> Subject: Re: [patch v4 00/13] branch tracing support for Atom
> Importance: High
> 
> On Tue, 27 Nov 2012 11:48:58 +0100, markus.t.metzger@intel.com wrote:
> >   - "btrace list" prints the blocks that have been traced; one line per block.
> [...]
> >   - "btrace" prints the branch trace disassembly
> 
> I see a partially similar reverse execution feature for GDB I use.
> 
> There one can easily find the interesting spot using the back-and-forth moving
> in the history using reverse-next, reverse-step, reverse-finish, but even
> finding back the spot by regular step/next/finish (only stepping in history).
> 
> But with reverse execution one (I) commonly use also watchpoints to find the
> spot, which is apparently not applicable with btrace.  Also the natural
> "backtrace" command would not work with btrace.  While the most correct way
> would be to make all memory as <unavailable> in practice one may want to print
> variables when stepping in the btrace history so there could be an exception
> for "print" command to temporarily make memory available with a warning.
> Just such an idea.
> 
> Reverse execution does not have such feature of the "listing" of its history.
> So unifying their interface could provide both "reverse-*" commands
> functionality with btrace and "listing" of the reverse-execution history.
> 
> Being used to reverse execution I find more natural to "reverse-step" to look
> where the inferior was before a moment.
> 
> But not sure if unifying btrace with reverse execution is a good idea at all
> having no practical experience with btrace yet.

Hmmm, I never thought about using the reverse execution cli for btrace. This might give the impression that btrace were more powerful than it actually is. I see btrace as a lower-cost alternative to reverse execution. It is less powerful but faster.

I would also expect problems with stepping, since we won't be able to fake a back trace using branch trace data. I don't expect that commands like reverse-next, next, and finish would work without special cases for btrace.

Regarding the btrace list feature, this might be something we may want to add to reverse execution. It gives an overview over the executed code in a very compact format. If people find this useful, we could compute something similar from the reverse execution history.

Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Peter Gleissner, 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]