From: "Willgerodt, Felix" <felix.willgerodt@intel.com>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH v6 07/10] btrace, gdbserver: Add ptwrite to btrace_config_pt.
Date: Thu, 20 Oct 2022 11:49:07 +0000 [thread overview]
Message-ID: <MN2PR11MB456614E453B5F6358FB0098D8E2A9@MN2PR11MB4566.namprd11.prod.outlook.com> (raw)
In-Reply-To: <DM8PR11MB57497E43FFE92374B1AB242EDE2B9@DM8PR11MB5749.namprd11.prod.outlook.com>
> -----Original Message-----
> From: Metzger, Markus T <markus.t.metzger@intel.com>
> Sent: Mittwoch, 19. Oktober 2022 16:42
> To: Willgerodt, Felix <felix.willgerodt@intel.com>
> Cc: gdb-patches@sourceware.org
> Subject: RE: [PATCH v6 07/10] btrace, gdbserver: Add ptwrite to
> btrace_config_pt.
>
> Hello Felix,
>
> >This enables gdb and gdbserver to communicate about ptwrite support. If
> >ptwrite support would be enabled unconditionally, GDBs with older libipt
> >versions would break.
> >---
> > gdb/btrace.c | 8 +++++++-
> > gdb/doc/gdb.texinfo | 21 +++++++++++++++++++++
> > gdb/features/btrace-conf.dtd | 1 +
> > gdb/remote.c | 30 ++++++++++++++++++++++++++++++
> > gdbserver/linux-low.cc | 2 ++
> > gdbserver/server.cc | 18 ++++++++++++++++++
> > gdbsupport/btrace-common.h | 6 ++++++
> > 7 files changed, 85 insertions(+), 1 deletion(-)
>
> Looks good to me with one nit:
>
> >--- a/gdb/features/btrace-conf.dtd
> >+++ b/gdb/features/btrace-conf.dtd
> >@@ -12,3 +12,4 @@
> >
> > <!ELEMENT pt EMPTY>
> > <!ATTLIST pt size CDATA #IMPLIED>
> >+<!ATTLIST pt ptwrite (yes | no) #IMPLIED>
>
> Should there be a space between 'ptwrite' and '(yes|no)'?
There is a tab there. That matches with the alignment of the file.
The other lines also have tabs.
I am not quite sure what you want changed.
> >diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
> >index 2f71360d3bd..1333ec13dbd 100644
> >--- a/gdbserver/linux-low.cc
> >+++ b/gdbserver/linux-low.cc
> >@@ -6806,6 +6806,8 @@ linux_process_target::read_btrace_conf (const
> >btrace_target_info *tinfo,
> > case BTRACE_FORMAT_PT:
> > buffer_xml_printf (buffer, "<pt");
> > buffer_xml_printf (buffer, " size=\"0x%x\"", conf->pt.size);
> >+ const char *ptw = conf->pt.ptwrite ? "yes" : "no";
> >+ buffer_xml_printf (buffer, " ptwrite=\"%s\"", ptw);
>
> We don't really need the PTW variable.
Right. I will inline 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
next prev parent reply other threads:[~2022-10-20 11:49 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 [this message]
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
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=MN2PR11MB456614E453B5F6358FB0098D8E2A9@MN2PR11MB4566.namprd11.prod.outlook.com \
--to=felix.willgerodt@intel.com \
--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).