Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Metzger, Markus T" <markus.t.metzger@intel.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>,
	Pedro Alves	<palves@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"markus.t.metzger@gmail.com" <markus.t.metzger@gmail.com>
Subject: RE: [rfc] remote, btrace: add branch tracing protocol to Qbtrace packet
Date: Thu, 28 Feb 2013 09:19:00 -0000	[thread overview]
Message-ID: <A78C989F6D9628469189715575E55B2307B86A67@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <20130227164738.GA29902@host2.jankratochvil.net>

> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Wednesday, February 27, 2013 5:48 PM


> > Eventually, I want GDB to collect all the supported btrace methods and allow
> > the user to specify one of the supported methods, i.e.
> >
> > set record btrace method bts
> > set record btrace method lbr
> 
> From the user interface point of view I expected rather:
> 	record full
> 	record btrace
> 	record lbr
> 
> It is already one level of "configuration", two levels of configuration make
> it a bit too complicated for the user IMO.  Sure the code inside GDB would be
> shared between "record-btrace" and "record-lbr" targets but that is hidden
> from the user.

That should be possible, as well.


> > I would create the respective sub-commands dynamically after querying the
> > target.  Unfortunately, we cannot remove the commands again on disconnect.
> 
> I do not think there should be dynamically created commands, it is not
> established in GDB.

I just thought it's more convenient for the user to only be offered commands
if the feature is available.  I'm OK to add those commands unconditionally.

Btw, I think target sub-commands are created dynamically when you call add_target.


> > As default, GDB will pick one of the supported methods, say, the first in the
> > qSupported response.
> 
> Do you expect more "btrace" variants than "bts" and "lbr"?

I would expect other processors to offer similar features.


> If "lbr" exists it should be enabled by default without asking the user.

We could do that until the user requests BTS tracing or full tracing. This would
mean that there would be a record target pushed implicitly. With the current
logic, this would prevent displaced stepping and would require an explicit
record stop before another record target can be pushed.

I think we should discuss the details once we start sending patches to enable
LBR tracing.


> For "bts" one has to type "record btrace" as it is a noticeable slowdown.

Agreed.


> > There will be separate entries for each supported method in the qSupported
> > response, i.e.
> >
> > ...:Qbtrace:bts+:Qbtrace:lbr+:...
> 
> colons vs. semicolons mistaken:
> 
>   ...;Qbtrace:bts+;Qbtrace:lbr+;...
> 
> 
> No preference for the qSupported details, I am OK with your proposal myself,
> "qXfer" gdbserver->gdb feature is designed that way already.

Pedro objected and rather wanted a comma-separated list, i.e.

....;Qbtrace=bts,lbr;...

I'm fine either way. For the way I proposed and what seems to be your preference,
as well, I already found code in GDB to handle it. For Pedro's preferred way, I have
not found anything that I could reuse.

I would like to get the minimal changes in with the btrace series so we don't need
to rework the protocol later on and are forced to maintain backwards compatibility.
I do not intend to implement full support for different branch trace recording
methods right now, since we currently only have one. We will add that support
when there's a need.

Pedro did not respond to my reply. I don't know how to proceed, here.

Regards,
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


  reply	other threads:[~2013-02-28  8:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-22 15:23 markus.t.metzger
2013-02-22 15:51 ` Eli Zaretskii
2013-02-25  8:51   ` Metzger, Markus T
2013-02-25  9:08     ` Jan Kratochvil
2013-02-25  9:13 ` FW: " Metzger, Markus T
2013-02-25 20:33 ` Pedro Alves
2013-02-26  9:24   ` Metzger, Markus T
2013-02-27 16:48     ` Jan Kratochvil
2013-02-28  9:19       ` Metzger, Markus T [this message]
2013-02-28 11:31         ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A78C989F6D9628469189715575E55B2307B86A67@IRSMSX102.ger.corp.intel.com \
    --to=markus.t.metzger@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=markus.t.metzger@gmail.com \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox