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: Wednesday, November 28, 2012 8:01 PM
> To: Markus Metzger
> Cc: Metzger, Markus T; gdb-patches@sourceware.org; palves@redhat.com; tromey@redhat.com; kettenis@gnu.org
> Subject: Re: [patch v4 00/13] branch tracing support for Atom
> 
> On Tue, 27 Nov 2012 19:56:07 +0100, Markus Metzger wrote:
> > I hard-coded one page of trace (or, rather, perf_event) buffer per thread.
> > We could make this configurable. I have not done this, yet, since I wanted
> > to keep the patch series small and simple until I get feedback.
> 
> Sorry for not reading the kernel arch code etc. for it but if the buffer is so
> small - mostly just catching the last jump to NULL, I would find better if
> kernel does not have to trap at all and saves just the last 4 or 16 jumps IIRC
> without any performance penalty, is there such an option?

We can make the buffer size configurable. I just hard-coded one page inside gdb. The kernel allows you to request larger buffers.

Yes, there is another hardware feature called LBR that contains the same information in a register-based ring buffer. This will give the last few branches. It is currently lacking a kernel interface to access those registers. If we added such an interface, we could make the trace recording method configurable and allow the user to choose between small trace without overhead or big trace with noticeable overhead. I don't know the exact overhead of LBR's. I would expect that if there is any overhead it shouldn't be noticeable.


> Sure some full buffer recording with virtual backtraces and reverse-* would be
> fine but that is probably out of the scope of this initial patchset.

Agreed.

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]