public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Willgerodt, Felix" <felix.willgerodt@intel.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"Metzger, Markus T" <markus.t.metzger@intel.com>
Subject: RE: [PATCH v6 10/10] btrace: Extend ptwrite event decoding.
Date: Fri, 16 Sep 2022 14:02:07 +0000	[thread overview]
Message-ID: <MN2PR11MB456678E2951D7451DEEEFBD08E489@MN2PR11MB4566.namprd11.prod.outlook.com> (raw)
In-Reply-To: <831qsb4jfj.fsf@gnu.org>

> -----Original Message-----
> From: Eli Zaretskii <eliz@gnu.org>
> Sent: Freitag, 16. September 2022 14:02
> To: Willgerodt, Felix <felix.willgerodt@intel.com>
> Cc: gdb-patches@sourceware.org; Metzger, Markus T
> <markus.t.metzger@intel.com>
> Subject: Re: [PATCH v6 10/10] btrace: Extend ptwrite event decoding.
> 
> > Date: Fri, 16 Sep 2022 13:36:46 +0200
> > From: Felix Willgerodt via Gdb-patches <gdb-patches@sourceware.org>
> >
> > --- a/gdb/NEWS
> > +++ b/gdb/NEWS
> > @@ -3,6 +3,12 @@
> >
> >  *** Changes since GDB 12
> >
> > +* GDB now supports printing of ptwrite payloads from the Intel Processor
> > +  Trace during 'record instruction-history', 'record function-call-history',
> > +  all stepping commands and in  Python.  Printing is customizable via a
> 
> Can we rephrase the "and in Python" part to be less confusing and
> ambiguous?  (Also, there's an extraneous blank character there.)

The NEWS file very often says "in Python".
But it is a fair point. How about "and in the Python API?"
I will fix the extra space.


> > +If an inferior uses the instruction, @value{GDBN} by default inserts the
> > +raw payload value as auxiliary information into the execution history.
> > +Auxiliary information is by default printed during
> > +@code{record instruction-history}, @code{record function-call-history},
> > +and all stepping commands and is accessible in Python as a
>                             ^
> Comma missing there.

Thanks, fixed locally.

> Btw, it sounds like this functionality is only available if GDB was
> built with Python?  If so, I think other places where you mention this
> in the manual should indicate that the feature is only available
> through Python.

That is true. Yet most of the documentation is in python.texi for that reason.
Do you think that is not enough?

The other documentation changes (outside of this patch) were for:
1) the btrace config parameter in RSP:
The new RSP parameter will be available regardless of Python.
I don't see a need or a good place to add anything here.
See patch 7.
2) about auxiliary instructions:
These are also python independent. That is by design, to be able
to use the infrastructure for other things in the future.
See patches 1-3.
3) New auxiliary instruction in Python. This is also in python.texi and clear
enough imo. See patch 5.
4) Document record.clear(). This is also only in python.texi and clear enough imo.
See patch 6.

If you think I should mention it in any of these, please let me know.
I don't see where it would make sense.

> > +This function will be called with the ptwrite payload and PC as arguments
> > +during trace decoding.                ^^^^^^^
> 
> @code{ptwrite}.
> 
> Also, please decide whether you want to use "ptwrite" in lower-case or
> PTWRITE in upper-case, and please use the same convention everywhere
> in the manual.

My intention was to use PTWRITE for the instruction. And lower case for
every ptwrite related "thing". E.g. the ptwrite packet, the ptwrite payload,
the ptwrite filter etc.
I will change it to @code{PTWRITE} everywhere.

> I also think talking about a "payload" obfuscates the description for
> no good reason.  It's just a value of some data type supported by the
> 'ptwrite' instruction, right?  If so, I think "value" is much clearer
> and less mysterious.

The Intel Software Developer Manual calls this value the "payload".
Mainly the chapter "Software Trace Instrumentation with PTWRITE".
I would rather have us stick to that name. Talking about just a "value"
or a "PTWRITE value" is more confusing in my eyes, as it isn't specific
and not the official name.

> > +@findex gdb.ptwrite.register_filter
> > +@defun register_filter (@var{filter})
> > +Used to register the ptwrite filter.  The filter can be any callable
>                         ^^^^^^^
> @code{ptwrite}

See my answer above.

> > +@findex gdb.ptwrite.get_filter
> > +@defun get_filter ()
> > +Returns the currently active ptwrite filter function.
> 
> I think our style is to say "Return", not "Returns".

Thanks, will change it.

Thanks,
Felix
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

  reply	other threads:[~2022-09-16 14:02 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 11:36 [PATCH v6 00/10] Extensions for PTWRITE Felix Willgerodt
2022-09-16 11:36 ` [PATCH v6 01/10] btrace: Introduce auxiliary instructions Felix Willgerodt
2022-09-16 11:46   ` Eli Zaretskii
2022-09-16 14:01     ` Willgerodt, Felix
2022-09-16 14:18       ` Eli Zaretskii
2022-09-16 11:36 ` [PATCH v6 02/10] btrace: Enable auxiliary instructions in record instruction-history Felix Willgerodt
2022-09-16 11:50   ` Eli Zaretskii
2022-09-16 11:36 ` [PATCH v6 03/10] btrace: Enable auxiliary instructions in record function-call-history Felix Willgerodt
2022-09-16 11:43   ` Eli Zaretskii
2022-09-16 11:36 ` [PATCH v6 04/10] btrace: Handle stepping and goto for auxiliary instructions Felix Willgerodt
2022-09-16 11:36 ` [PATCH v6 05/10] python: Introduce gdb.RecordAuxiliary class Felix Willgerodt
2022-09-16 12:04   ` Eli Zaretskii
2022-09-16 11:36 ` [PATCH v6 06/10] python: Add clear() to gdb.Record Felix Willgerodt
2022-09-16 11:49   ` Eli Zaretskii
2022-09-16 11:36 ` [PATCH v6 07/10] btrace, gdbserver: Add ptwrite to btrace_config_pt Felix Willgerodt
2022-09-16 11:49   ` Eli Zaretskii
2022-09-16 14:02     ` Willgerodt, Felix
2022-10-19 14:41   ` Metzger, Markus T
2022-10-20 11:49     ` Willgerodt, Felix
2022-10-20 12:31       ` Metzger, Markus T
2022-09-16 11:36 ` [PATCH v6 08/10] btrace, linux: Enable ptwrite packets Felix Willgerodt
2022-09-16 11:36 ` [PATCH v6 09/10] btrace, python: Enable ptwrite filter registration Felix Willgerodt
2022-10-19 14:41   ` Metzger, Markus T
2022-10-20 11:49     ` Willgerodt, Felix
2022-10-20 12:33       ` Metzger, Markus T
2022-09-16 11:36 ` [PATCH v6 10/10] btrace: Extend ptwrite event decoding Felix Willgerodt
2022-09-16 12:01   ` Eli Zaretskii
2022-09-16 14:02     ` Willgerodt, Felix [this message]
2022-09-16 14:21       ` Eli Zaretskii
2022-09-16 14:34         ` Willgerodt, Felix
2022-09-16 15:29           ` Eli Zaretskii
2022-09-19 11:23             ` Willgerodt, Felix
2022-10-19 14:45 ` [PATCH v6 00/10] Extensions for PTWRITE Metzger, Markus T

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=MN2PR11MB456678E2951D7451DEEEFBD08E489@MN2PR11MB4566.namprd11.prod.outlook.com \
    --to=felix.willgerodt@intel.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).