public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v7 00/10] Extensions for PTWRITE
@ 2022-10-21 11:59 Felix Willgerodt
  2022-10-21 11:59 ` Felix Willgerodt
                   ` (10 more replies)
  0 siblings, 11 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

Eli already approved the documentation parts.
Markus reviewed every patch and approved the btrace bits.
The only thing that is missing is a global maintainers approval for
the Python bits.

Compared to v6 I only addressed the nits that Eli and Markus pointed out.

The older revisions can be found here:
V1: https://sourceware.org/pipermail/gdb-patches/2019-May/157933.html
V2: https://sourceware.org/pipermail/gdb-patches/2021-June/179908.html
V3: https://sourceware.org/pipermail/gdb-patches/2021-June/180035.html
v4: https://sourceware.org/pipermail/gdb-patches/2022-May/188772.html
v5: https://sourceware.org/pipermail/gdb-patches/2022-June/190236.html
v6: https://sourceware.org/pipermail/gdb-patches/2022-September/191866.html

Thanks,
Felix

Felix Willgerodt (10):
  btrace: Introduce auxiliary instructions.
  btrace: Enable auxiliary instructions in record instruction-history.
  btrace: Enable auxiliary instructions in record function-call-history.
  btrace: Handle stepping and goto for auxiliary instructions.
  python: Introduce gdb.RecordAuxiliary class.
  python: Add clear() to gdb.Record.
  btrace, gdbserver: Add ptwrite to btrace_config_pt.
  btrace, linux: Enable ptwrite packets.
  btrace, python: Enable ptwrite filter registration.
  btrace: Extend ptwrite event decoding.

 gdb/NEWS                                      |   7 +
 gdb/btrace.c                                  |  68 ++-
 gdb/btrace.h                                  |  38 +-
 gdb/config.in                                 |   3 +
 gdb/configure                                 |  11 +
 gdb/data-directory/Makefile.in                |   1 +
 gdb/disasm-flags.h                            |   1 +
 gdb/doc/gdb.texinfo                           |  32 +-
 gdb/doc/python.texi                           | 168 ++++++
 gdb/extension-priv.h                          |   5 +
 gdb/extension.c                               |  13 +
 gdb/extension.h                               |   3 +
 gdb/features/btrace-conf.dtd                  |   1 +
 gdb/guile/guile.c                             |   1 +
 gdb/nat/linux-btrace.c                        |  29 +
 gdb/python/lib/gdb/ptwrite.py                 |  80 +++
 gdb/python/py-record-btrace.c                 | 136 ++++-
 gdb/python/py-record-btrace.h                 |  11 +
 gdb/python/py-record.c                        |  89 ++-
 gdb/python/py-record.h                        |   3 +
 gdb/python/python-internal.h                  |   3 +
 gdb/python/python.c                           |   2 +
 gdb/record-btrace.c                           | 107 +++-
 gdb/record.c                                  |  10 +
 gdb/record.h                                  |   5 +-
 gdb/remote.c                                  |  30 +
 gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550 ++++++++++++++++++
 gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
 gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544 +++++++++++++++++
 gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
 gdb/testsuite/lib/gdb.exp                     |  74 +++
 gdbserver/linux-low.cc                        |   2 +
 gdbserver/server.cc                           |  18 +
 gdbsupport/btrace-common.h                    |   6 +
 gdbsupport/common.m4                          |   2 +
 gdbsupport/config.in                          |   3 +
 gdbsupport/configure                          |  11 +
 38 files changed, 2286 insertions(+), 35 deletions(-)
 create mode 100644 gdb/python/lib/gdb/ptwrite.py
 create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
 create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
 create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
 create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S

-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 00/10] Extensions for PTWRITE
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59 ` [PATCH v7 01/10] btrace: Introduce auxiliary instructions Felix Willgerodt
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger; +Cc: Felix Willgerodt

Eli already approved the documentation parts.
Markus reviewed every patch and approved the btrace bits.
The only thing that is missing is a global maintainers approval for
the Python bits.

Compared to v6 I only addressed the nits that Eli and Markus pointed out.

The older revisions can be found here:
V1: https://sourceware.org/pipermail/gdb-patches/2019-May/157933.html
V2: https://sourceware.org/pipermail/gdb-patches/2021-June/179908.html
V3: https://sourceware.org/pipermail/gdb-patches/2021-June/180035.html
v4: https://sourceware.org/pipermail/gdb-patches/2022-May/188772.html
v5: https://sourceware.org/pipermail/gdb-patches/2022-June/190236.html
v6: https://sourceware.org/pipermail/gdb-patches/2022-September/191866.html

Thanks,
Felix

Felix Willgerodt (10):
  btrace: Introduce auxiliary instructions.
  btrace: Enable auxiliary instructions in record instruction-history.
  btrace: Enable auxiliary instructions in record function-call-history.
  btrace: Handle stepping and goto for auxiliary instructions.
  python: Introduce gdb.RecordAuxiliary class.
  python: Add clear() to gdb.Record.
  btrace, gdbserver: Add ptwrite to btrace_config_pt.
  btrace, linux: Enable ptwrite packets.
  btrace, python: Enable ptwrite filter registration.
  btrace: Extend ptwrite event decoding.

 gdb/NEWS                                      |   7 +
 gdb/btrace.c                                  |  68 ++-
 gdb/btrace.h                                  |  38 +-
 gdb/config.in                                 |   3 +
 gdb/configure                                 |  11 +
 gdb/data-directory/Makefile.in                |   1 +
 gdb/disasm-flags.h                            |   1 +
 gdb/doc/gdb.texinfo                           |  32 +-
 gdb/doc/python.texi                           | 168 ++++++
 gdb/extension-priv.h                          |   5 +
 gdb/extension.c                               |  13 +
 gdb/extension.h                               |   3 +
 gdb/features/btrace-conf.dtd                  |   1 +
 gdb/guile/guile.c                             |   1 +
 gdb/nat/linux-btrace.c                        |  29 +
 gdb/python/lib/gdb/ptwrite.py                 |  80 +++
 gdb/python/py-record-btrace.c                 | 136 ++++-
 gdb/python/py-record-btrace.h                 |  11 +
 gdb/python/py-record.c                        |  89 ++-
 gdb/python/py-record.h                        |   3 +
 gdb/python/python-internal.h                  |   3 +
 gdb/python/python.c                           |   2 +
 gdb/record-btrace.c                           | 107 +++-
 gdb/record.c                                  |  10 +
 gdb/record.h                                  |   5 +-
 gdb/remote.c                                  |  30 +
 gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550 ++++++++++++++++++
 gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
 gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544 +++++++++++++++++
 gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
 gdb/testsuite/lib/gdb.exp                     |  74 +++
 gdbserver/linux-low.cc                        |   2 +
 gdbserver/server.cc                           |  18 +
 gdbsupport/btrace-common.h                    |   6 +
 gdbsupport/common.m4                          |   2 +
 gdbsupport/config.in                          |   3 +
 gdbsupport/configure                          |  11 +
 38 files changed, 2286 insertions(+), 35 deletions(-)
 create mode 100644 gdb/python/lib/gdb/ptwrite.py
 create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
 create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
 create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
 create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S

-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 01/10] btrace: Introduce auxiliary instructions.
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
  2022-10-21 11:59 ` Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59   ` Felix Willgerodt
  2022-10-21 13:19   ` Eli Zaretskii
  2022-10-21 11:59 ` [PATCH v7 02/10] btrace: Enable auxiliary instructions in record instruction-history Felix Willgerodt
                   ` (8 subsequent siblings)
  10 siblings, 2 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

Auxiliary instructions are pseudo instructions pointing to auxiliary data.
This auxiliary data can be printed in all commands displaying (record
function-call-history, record instruction-history) or stepping through
(stepi etc.) the execution history, which will be introduced in the next
commits.

This patch is in preparation for the new ptwrite feature, which is based on
auxiliary instructions.
---
 gdb/btrace.c        |  2 ++
 gdb/btrace.h        | 24 +++++++++++++++++++++---
 gdb/doc/gdb.texinfo |  3 +++
 3 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/gdb/btrace.c b/gdb/btrace.c
index a8e6049265c..4a1b10b7c81 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -1823,6 +1823,8 @@ btrace_clear_history (struct btrace_thread_info *btinfo)
   btinfo->insn_history = NULL;
   btinfo->call_history = NULL;
   btinfo->replay = NULL;
+
+  btinfo->aux_data.clear ();
 }
 
 /* Clear the branch trace maintenance histories in BTINFO.  */
diff --git a/gdb/btrace.h b/gdb/btrace.h
index 0fcf669597a..be4ce424ed5 100644
--- a/gdb/btrace.h
+++ b/gdb/btrace.h
@@ -52,7 +52,10 @@ enum btrace_insn_class
   BTRACE_INSN_RETURN,
 
   /* The instruction is an unconditional jump.  */
-  BTRACE_INSN_JUMP
+  BTRACE_INSN_JUMP,
+
+  /* The instruction is a pseudo instruction containing auxiliary data.  */
+  BTRACE_INSN_AUX
 };
 
 /* Instruction flags.  */
@@ -68,8 +71,19 @@ DEF_ENUM_FLAGS_TYPE (enum btrace_insn_flag, btrace_insn_flags);
    This represents a single instruction in a branch trace.  */
 struct btrace_insn
 {
-  /* The address of this instruction.  */
-  CORE_ADDR pc;
+  union
+  {
+    /* The address of this instruction.  Applies to btrace_insn with
+       iclass == BTRACE_INSN_OTHER or
+       iclass == BTRACE_INSN_CALL or
+       iclass == BTRACE_INSN_RETURN or
+       iclass == BTRACE_INSN_JUMP.  */
+    CORE_ADDR pc;
+
+    /* Index into btrace_info::aux_data.  Applies to btrace_insn with
+       iclass == BTRACE_INSN_AUX.  */
+    uint64_t aux_data_index;
+  };
 
   /* The size of this instruction in bytes.  */
   gdb_byte size;
@@ -330,6 +344,10 @@ struct btrace_thread_info
      function segment i will be at index (i - 1).  */
   std::vector<btrace_function> functions;
 
+  /* Optional auxiliary information that is printed in all commands
+     displaying or stepping through the execution history.  */
+  std::vector<std::string> aux_data;
+
   /* The function level offset.  When added to each function's LEVEL,
      this normalizes the function levels such that the smallest level
      becomes zero.  */
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index ea66f4ee42d..5df67eb6644 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -7545,6 +7545,9 @@ Moxie, PowerPC, PowerPC64, S/390, and x86 (i386/amd64) running
 GNU/Linux.  Process record and replay can be used both when native
 debugging, and when remote debugging via @code{gdbserver}.
 
+When recording an inferior, @value{GDBN} may print auxiliary information
+during stepping commands and commands displaying the execution history.
+
 For architecture environments that support process record and replay,
 @value{GDBN} provides the following commands:
 
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 01/10] btrace: Introduce auxiliary instructions.
  2022-10-21 11:59 ` [PATCH v7 01/10] btrace: Introduce auxiliary instructions Felix Willgerodt
@ 2022-10-21 11:59   ` Felix Willgerodt
  2022-10-21 13:19   ` Eli Zaretskii
  1 sibling, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger; +Cc: Felix Willgerodt

Auxiliary instructions are pseudo instructions pointing to auxiliary data.
This auxiliary data can be printed in all commands displaying (record
function-call-history, record instruction-history) or stepping through
(stepi etc.) the execution history, which will be introduced in the next
commits.

This patch is in preparation for the new ptwrite feature, which is based on
auxiliary instructions.
---
 gdb/btrace.c        |  2 ++
 gdb/btrace.h        | 24 +++++++++++++++++++++---
 gdb/doc/gdb.texinfo |  3 +++
 3 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/gdb/btrace.c b/gdb/btrace.c
index a8e6049265c..4a1b10b7c81 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -1823,6 +1823,8 @@ btrace_clear_history (struct btrace_thread_info *btinfo)
   btinfo->insn_history = NULL;
   btinfo->call_history = NULL;
   btinfo->replay = NULL;
+
+  btinfo->aux_data.clear ();
 }
 
 /* Clear the branch trace maintenance histories in BTINFO.  */
diff --git a/gdb/btrace.h b/gdb/btrace.h
index 0fcf669597a..be4ce424ed5 100644
--- a/gdb/btrace.h
+++ b/gdb/btrace.h
@@ -52,7 +52,10 @@ enum btrace_insn_class
   BTRACE_INSN_RETURN,
 
   /* The instruction is an unconditional jump.  */
-  BTRACE_INSN_JUMP
+  BTRACE_INSN_JUMP,
+
+  /* The instruction is a pseudo instruction containing auxiliary data.  */
+  BTRACE_INSN_AUX
 };
 
 /* Instruction flags.  */
@@ -68,8 +71,19 @@ DEF_ENUM_FLAGS_TYPE (enum btrace_insn_flag, btrace_insn_flags);
    This represents a single instruction in a branch trace.  */
 struct btrace_insn
 {
-  /* The address of this instruction.  */
-  CORE_ADDR pc;
+  union
+  {
+    /* The address of this instruction.  Applies to btrace_insn with
+       iclass == BTRACE_INSN_OTHER or
+       iclass == BTRACE_INSN_CALL or
+       iclass == BTRACE_INSN_RETURN or
+       iclass == BTRACE_INSN_JUMP.  */
+    CORE_ADDR pc;
+
+    /* Index into btrace_info::aux_data.  Applies to btrace_insn with
+       iclass == BTRACE_INSN_AUX.  */
+    uint64_t aux_data_index;
+  };
 
   /* The size of this instruction in bytes.  */
   gdb_byte size;
@@ -330,6 +344,10 @@ struct btrace_thread_info
      function segment i will be at index (i - 1).  */
   std::vector<btrace_function> functions;
 
+  /* Optional auxiliary information that is printed in all commands
+     displaying or stepping through the execution history.  */
+  std::vector<std::string> aux_data;
+
   /* The function level offset.  When added to each function's LEVEL,
      this normalizes the function levels such that the smallest level
      becomes zero.  */
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index ea66f4ee42d..5df67eb6644 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -7545,6 +7545,9 @@ Moxie, PowerPC, PowerPC64, S/390, and x86 (i386/amd64) running
 GNU/Linux.  Process record and replay can be used both when native
 debugging, and when remote debugging via @code{gdbserver}.
 
+When recording an inferior, @value{GDBN} may print auxiliary information
+during stepping commands and commands displaying the execution history.
+
 For architecture environments that support process record and replay,
 @value{GDBN} provides the following commands:
 
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 02/10] btrace: Enable auxiliary instructions in record instruction-history.
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
  2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59 ` [PATCH v7 01/10] btrace: Introduce auxiliary instructions Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59 ` [PATCH v7 03/10] btrace: Enable auxiliary instructions in record function-call-history Felix Willgerodt
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

Print the auxiliary data when a btrace_insn of type BTRACE_INSN_AUX
is encountered in the instruction-history.  Printing is active by default,
it can be silenced with the /a modifier.

This patch is in preparation for the new ptwrite feature, which is based on
auxiliary instructions.
---
 gdb/disasm-flags.h  |  1 +
 gdb/doc/gdb.texinfo |  3 +++
 gdb/record-btrace.c | 14 ++++++++++++++
 gdb/record.c        |  5 +++++
 4 files changed, 23 insertions(+)

diff --git a/gdb/disasm-flags.h b/gdb/disasm-flags.h
index 9420e7c478c..e07891794f5 100644
--- a/gdb/disasm-flags.h
+++ b/gdb/disasm-flags.h
@@ -34,6 +34,7 @@ enum gdb_disassembly_flag : unsigned
     DISASSEMBLY_SOURCE = (0x1 << 5),
     DISASSEMBLY_SPECULATIVE = (0x1 << 6),
     DISASSEMBLY_RAW_BYTES = (0x1 << 7),
+    DISASSEMBLY_OMIT_AUX_INSN = (0x1 << 8),
   };
 DEF_ENUM_FLAGS_TYPE (enum gdb_disassembly_flag, gdb_disassembly_flags);
 
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5df67eb6644..00a4d595490 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -7963,6 +7963,9 @@ To better align the printed instructions when the trace contains
 instructions from more than one function, the function name may be
 omitted by specifying the @code{/f} modifier.
 
+Printing auxiliary information is enabled by default and can be
+omitted with the @code{/a} modifier.
+
 Speculatively executed instructions are prefixed with @samp{?}.  This
 feature is not available for all recording formats.
 
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 5cf978b932c..78e6514adf0 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -821,6 +821,20 @@ btrace_insn_history (struct ui_out *uiout,
 	  btrace_ui_out_decode_error (uiout, btrace_insn_get_error (&it),
 				      conf->format);
 	}
+      else if (insn->iclass == BTRACE_INSN_AUX)
+	{
+	  if ((flags & DISASSEMBLY_OMIT_AUX_INSN) != 0)
+	    continue;
+
+	  uiout->field_fmt ("insn-number", "%u", btrace_insn_number (&it));
+	  uiout->text ("\t");
+	  uiout->spaces (3);
+	  uiout->text ("[");
+	  uiout->field_fmt ("aux-data", "%s",
+			    it.btinfo->aux_data.at
+			     (insn->aux_data_index).c_str ());
+	  uiout->text ("]\n");
+	}
       else
 	{
 	  struct disasm_insn dinsn;
diff --git a/gdb/record.c b/gdb/record.c
index 2390a58f9c0..f4402b58144 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -486,6 +486,9 @@ get_insn_history_modifiers (const char **arg)
 
 	  switch (*args)
 	    {
+	    case 'a':
+	      modifiers |= DISASSEMBLY_OMIT_AUX_INSN;
+	      break;
 	    case 'm':
 	    case 's':
 	      modifiers |= DISASSEMBLY_SOURCE;
@@ -856,6 +859,8 @@ With a /m or /s modifier, source lines are included (if available).\n\
 With a /r modifier, raw instructions in hex are included.\n\
 With a /f modifier, function names are omitted.\n\
 With a /p modifier, current position markers are omitted.\n\
+With a /a modifier, omits output of auxiliary data, which is enabled \
+by default.\n\
 With no argument, disassembles ten more instructions after the previous \
 disassembly.\n\
 \"record instruction-history -\" disassembles ten instructions before a \
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 03/10] btrace: Enable auxiliary instructions in record function-call-history.
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
                   ` (2 preceding siblings ...)
  2022-10-21 11:59 ` [PATCH v7 02/10] btrace: Enable auxiliary instructions in record instruction-history Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59   ` Felix Willgerodt
  2022-10-21 11:59 ` [PATCH v7 04/10] btrace: Handle stepping and goto for auxiliary instructions Felix Willgerodt
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

Print the auxiliary data when a btrace_insn of type BTRACE_INSN_AUX
is encountered in the function-call-history.  Printing is
active by default, it can be silenced with the /a modifier.

This patch is in preparation for the new ptwrite feature, which is based on
auxiliary instructions.
---
 gdb/btrace.h        |  6 +++++-
 gdb/doc/gdb.texinfo |  5 +++--
 gdb/record-btrace.c | 21 +++++++++++++++++++++
 gdb/record.c        |  5 +++++
 gdb/record.h        |  5 ++++-
 5 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/gdb/btrace.h b/gdb/btrace.h
index be4ce424ed5..36870d9b2ec 100644
--- a/gdb/btrace.h
+++ b/gdb/btrace.h
@@ -105,7 +105,11 @@ enum btrace_function_flag
 
   /* The 'up' link points to a tail call.  This obviously only makes sense
      if bfun_up_links_to_ret is clear.  */
-  BFUN_UP_LINKS_TO_TAILCALL = (1 << 1)
+  BFUN_UP_LINKS_TO_TAILCALL = (1 << 1),
+
+  /* Indicates that at least one auxiliary instruction is in the current
+     function segment.  */
+  BFUN_CONTAINS_AUX = (1 << 2)
 };
 DEF_ENUM_FLAGS_TYPE (enum btrace_function_flag, btrace_function_flags);
 
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 00a4d595490..1daecaf643a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -8019,8 +8019,9 @@ that function, the source lines for this instruction sequence (if the
 @code{/l} modifier is specified), and the instructions numbers that form
 the sequence (if the @code{/i} modifier is specified).  The function names
 are indented to reflect the call stack depth if the @code{/c} modifier is
-specified.  The @code{/l}, @code{/i}, and @code{/c} modifiers can be given
-together.
+specified.  Printing auxiliary information is enabled by default and can be
+omitted with the @code{/a} modifier.  The @code{/l}, @code{/i}, @code{/a},
+and @code{/c} modifiers can be given together.
 
 @smallexample
 (@value{GDBP}) @b{list 1, 10}
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 78e6514adf0..cbdb8224ba3 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -1153,6 +1153,23 @@ btrace_get_bfun_name (const struct btrace_function *bfun)
     return "??";
 }
 
+static void
+btrace_print_aux_insn (struct ui_out *uiout,
+		       const struct btrace_function *bfun,
+		       const struct btrace_thread_info *btinfo)
+{
+  for (const btrace_insn &insn : bfun->insn)
+    {
+      if (insn.iclass == BTRACE_INSN_AUX)
+	{
+	  uiout->text ("\t\t[");
+	  uiout->field_fmt ("aux-data", "%s",
+			    btinfo->aux_data.at (insn.aux_data_index).c_str ());
+	  uiout->text ("]\n");
+	}
+    }
+}
+
 /* Disassemble a section of the recorded function trace.  */
 
 static void
@@ -1228,6 +1245,10 @@ btrace_call_history (struct ui_out *uiout,
 	}
 
       uiout->text ("\n");
+
+      if (((flags & RECORD_DONT_PRINT_AUX) == 0)
+	  && ((bfun->flags & BFUN_CONTAINS_AUX) != 0))
+	btrace_print_aux_insn(uiout, bfun, btinfo);
     }
 }
 
diff --git a/gdb/record.c b/gdb/record.c
index f4402b58144..fa99b97ed26 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -639,6 +639,9 @@ get_call_history_modifiers (const char **arg)
 	    case 'c':
 	      modifiers |= RECORD_PRINT_INDENT_CALLS;
 	      break;
+	    case 'a':
+	      modifiers |= RECORD_DONT_PRINT_AUX;
+	      break;
 	    default:
 	      error (_("Invalid modifier: %c."), *args);
 	    }
@@ -883,6 +886,8 @@ Without modifiers, it prints the function name.\n\
 With a /l modifier, the source file and line number range is included.\n\
 With a /i modifier, the instruction number range is included.\n\
 With a /c modifier, the output is indented based on the call stack depth.\n\
+With a /a modifier, omits output of auxiliary data, which is enabled \
+by default.\n\
 With no argument, prints ten more lines after the previous ten-line print.\n\
 \"record function-call-history -\" prints ten lines before a previous ten-line \
 print.\n\
diff --git a/gdb/record.h b/gdb/record.h
index 0fbca9d44ce..d882f313c1d 100644
--- a/gdb/record.h
+++ b/gdb/record.h
@@ -62,7 +62,10 @@ enum record_print_flag
   RECORD_PRINT_INSN_RANGE = (1 << 1),
 
   /* Indent based on call stack depth (if applicable).  */
-  RECORD_PRINT_INDENT_CALLS = (1 << 2)
+  RECORD_PRINT_INDENT_CALLS = (1 << 2),
+
+  /* Deactivate printing auxiliary data (if applicable).  */
+  RECORD_DONT_PRINT_AUX = (1 << 3)
 };
 DEF_ENUM_FLAGS_TYPE (enum record_print_flag, record_print_flags);
 
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 03/10] btrace: Enable auxiliary instructions in record function-call-history.
  2022-10-21 11:59 ` [PATCH v7 03/10] btrace: Enable auxiliary instructions in record function-call-history Felix Willgerodt
@ 2022-10-21 11:59   ` Felix Willgerodt
  0 siblings, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger; +Cc: Felix Willgerodt

Print the auxiliary data when a btrace_insn of type BTRACE_INSN_AUX
is encountered in the function-call-history.  Printing is
active by default, it can be silenced with the /a modifier.

This patch is in preparation for the new ptwrite feature, which is based on
auxiliary instructions.
---
 gdb/btrace.h        |  6 +++++-
 gdb/doc/gdb.texinfo |  5 +++--
 gdb/record-btrace.c | 21 +++++++++++++++++++++
 gdb/record.c        |  5 +++++
 gdb/record.h        |  5 ++++-
 5 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/gdb/btrace.h b/gdb/btrace.h
index be4ce424ed5..36870d9b2ec 100644
--- a/gdb/btrace.h
+++ b/gdb/btrace.h
@@ -105,7 +105,11 @@ enum btrace_function_flag
 
   /* The 'up' link points to a tail call.  This obviously only makes sense
      if bfun_up_links_to_ret is clear.  */
-  BFUN_UP_LINKS_TO_TAILCALL = (1 << 1)
+  BFUN_UP_LINKS_TO_TAILCALL = (1 << 1),
+
+  /* Indicates that at least one auxiliary instruction is in the current
+     function segment.  */
+  BFUN_CONTAINS_AUX = (1 << 2)
 };
 DEF_ENUM_FLAGS_TYPE (enum btrace_function_flag, btrace_function_flags);
 
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 00a4d595490..1daecaf643a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -8019,8 +8019,9 @@ that function, the source lines for this instruction sequence (if the
 @code{/l} modifier is specified), and the instructions numbers that form
 the sequence (if the @code{/i} modifier is specified).  The function names
 are indented to reflect the call stack depth if the @code{/c} modifier is
-specified.  The @code{/l}, @code{/i}, and @code{/c} modifiers can be given
-together.
+specified.  Printing auxiliary information is enabled by default and can be
+omitted with the @code{/a} modifier.  The @code{/l}, @code{/i}, @code{/a},
+and @code{/c} modifiers can be given together.
 
 @smallexample
 (@value{GDBP}) @b{list 1, 10}
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 78e6514adf0..cbdb8224ba3 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -1153,6 +1153,23 @@ btrace_get_bfun_name (const struct btrace_function *bfun)
     return "??";
 }
 
+static void
+btrace_print_aux_insn (struct ui_out *uiout,
+		       const struct btrace_function *bfun,
+		       const struct btrace_thread_info *btinfo)
+{
+  for (const btrace_insn &insn : bfun->insn)
+    {
+      if (insn.iclass == BTRACE_INSN_AUX)
+	{
+	  uiout->text ("\t\t[");
+	  uiout->field_fmt ("aux-data", "%s",
+			    btinfo->aux_data.at (insn.aux_data_index).c_str ());
+	  uiout->text ("]\n");
+	}
+    }
+}
+
 /* Disassemble a section of the recorded function trace.  */
 
 static void
@@ -1228,6 +1245,10 @@ btrace_call_history (struct ui_out *uiout,
 	}
 
       uiout->text ("\n");
+
+      if (((flags & RECORD_DONT_PRINT_AUX) == 0)
+	  && ((bfun->flags & BFUN_CONTAINS_AUX) != 0))
+	btrace_print_aux_insn(uiout, bfun, btinfo);
     }
 }
 
diff --git a/gdb/record.c b/gdb/record.c
index f4402b58144..fa99b97ed26 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -639,6 +639,9 @@ get_call_history_modifiers (const char **arg)
 	    case 'c':
 	      modifiers |= RECORD_PRINT_INDENT_CALLS;
 	      break;
+	    case 'a':
+	      modifiers |= RECORD_DONT_PRINT_AUX;
+	      break;
 	    default:
 	      error (_("Invalid modifier: %c."), *args);
 	    }
@@ -883,6 +886,8 @@ Without modifiers, it prints the function name.\n\
 With a /l modifier, the source file and line number range is included.\n\
 With a /i modifier, the instruction number range is included.\n\
 With a /c modifier, the output is indented based on the call stack depth.\n\
+With a /a modifier, omits output of auxiliary data, which is enabled \
+by default.\n\
 With no argument, prints ten more lines after the previous ten-line print.\n\
 \"record function-call-history -\" prints ten lines before a previous ten-line \
 print.\n\
diff --git a/gdb/record.h b/gdb/record.h
index 0fbca9d44ce..d882f313c1d 100644
--- a/gdb/record.h
+++ b/gdb/record.h
@@ -62,7 +62,10 @@ enum record_print_flag
   RECORD_PRINT_INSN_RANGE = (1 << 1),
 
   /* Indent based on call stack depth (if applicable).  */
-  RECORD_PRINT_INDENT_CALLS = (1 << 2)
+  RECORD_PRINT_INDENT_CALLS = (1 << 2),
+
+  /* Deactivate printing auxiliary data (if applicable).  */
+  RECORD_DONT_PRINT_AUX = (1 << 3)
 };
 DEF_ENUM_FLAGS_TYPE (enum record_print_flag, record_print_flags);
 
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 04/10] btrace: Handle stepping and goto for auxiliary instructions.
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
                   ` (3 preceding siblings ...)
  2022-10-21 11:59 ` [PATCH v7 03/10] btrace: Enable auxiliary instructions in record function-call-history Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59   ` Felix Willgerodt
  2022-10-21 11:59 ` [PATCH v7 05/10] python: Introduce gdb.RecordAuxiliary class Felix Willgerodt
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

Print the auxiliary data when stepping. Don't allow to goto an auxiliary
instruction.

This patch is in preparation for the new ptwrite feature, which is based on
auxiliary instructions.
---
 gdb/record-btrace.c | 67 ++++++++++++++++++++++++++++++++++++---------
 1 file changed, 54 insertions(+), 13 deletions(-)

diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index cbdb8224ba3..0767dd12fee 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2373,9 +2373,13 @@ record_btrace_single_step_forward (struct thread_info *tp)
     return btrace_step_stopped ();
 
   /* Skip gaps during replay.  If we end up at a gap (at the end of the trace),
-     jump back to the instruction at which we started.  */
+     jump back to the instruction at which we started.  If we're stepping a
+     BTRACE_INSN_AUX instruction, print the auxiliary data and skip the
+     instruction.  */
+
   start = *replay;
-  do
+
+  for (;;)
     {
       unsigned int steps;
 
@@ -2383,12 +2387,27 @@ record_btrace_single_step_forward (struct thread_info *tp)
 	 of the execution history.  */
       steps = btrace_insn_next (replay, 1);
       if (steps == 0)
+        {
+          *replay = start;
+          return btrace_step_no_history ();
+        }
+
+      const struct btrace_insn *insn = btrace_insn_get (replay);
+      if (insn == nullptr)
+	continue;
+
+      /* If we're stepping a BTRACE_INSN_AUX instruction, print the auxiliary
+	 data and skip the instruction.  */
+      if (insn->iclass == BTRACE_INSN_AUX)
 	{
-	  *replay = start;
-	  return btrace_step_no_history ();
+	  gdb_printf ("[%s]\n",
+		      btinfo->aux_data.at (insn->aux_data_index).c_str ());
+	  continue;
 	}
+
+      /* We have an instruction, we are done.  */
+      break;
     }
-  while (btrace_insn_get (replay) == NULL);
 
   /* Determine the end of the instruction trace.  */
   btrace_insn_end (&end, btinfo);
@@ -2419,9 +2438,12 @@ record_btrace_single_step_backward (struct thread_info *tp)
 
   /* If we can't step any further, we reached the end of the history.
      Skip gaps during replay.  If we end up at a gap (at the beginning of
-     the trace), jump back to the instruction at which we started.  */
+     the trace), jump back to the instruction at which we started.
+     If we're stepping a BTRACE_INSN_AUX instruction, print the auxiliary
+     data and skip the instruction.  */
   start = *replay;
-  do
+
+  for (;;)
     {
       unsigned int steps;
 
@@ -2431,8 +2453,22 @@ record_btrace_single_step_backward (struct thread_info *tp)
 	  *replay = start;
 	  return btrace_step_no_history ();
 	}
+
+      const struct btrace_insn *insn = btrace_insn_get (replay);
+      if (insn == nullptr)
+	continue;
+
+      /* Check if we're stepping a BTRACE_INSN_AUX instruction and skip it.  */
+      if (insn->iclass == BTRACE_INSN_AUX)
+	{
+	  gdb_printf ("[%s]\n",
+		      btinfo->aux_data.at (insn->aux_data_index).c_str ());
+	  continue;
+	}
+
+      /* We have an instruction, we are done.  */
+      break;
     }
-  while (btrace_insn_get (replay) == NULL);
 
   /* Check if we're stepping a breakpoint.
 
@@ -2854,25 +2890,30 @@ record_btrace_target::goto_record_end ()
 /* The goto_record method of target record-btrace.  */
 
 void
-record_btrace_target::goto_record (ULONGEST insn)
+record_btrace_target::goto_record (ULONGEST insn_number)
 {
   struct thread_info *tp;
   struct btrace_insn_iterator it;
   unsigned int number;
   int found;
 
-  number = insn;
+  number = insn_number;
 
   /* Check for wrap-arounds.  */
-  if (number != insn)
+  if (number != insn_number)
     error (_("Instruction number out of range."));
 
   tp = require_btrace_thread ();
 
   found = btrace_find_insn_by_number (&it, &tp->btrace, number);
 
-  /* Check if the instruction could not be found or is a gap.  */
-  if (found == 0 || btrace_insn_get (&it) == NULL)
+  /* Check if the instruction could not be found or is a gap or an
+     auxilliary instruction.  */
+  if (found == 0)
+    error (_("No such instruction."));
+
+  const struct btrace_insn *insn = btrace_insn_get (&it);
+  if ((insn == NULL) || (insn->iclass == BTRACE_INSN_AUX))
     error (_("No such instruction."));
 
   record_btrace_set_replay (tp, &it);
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 04/10] btrace: Handle stepping and goto for auxiliary instructions.
  2022-10-21 11:59 ` [PATCH v7 04/10] btrace: Handle stepping and goto for auxiliary instructions Felix Willgerodt
@ 2022-10-21 11:59   ` Felix Willgerodt
  0 siblings, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger; +Cc: Felix Willgerodt

Print the auxiliary data when stepping. Don't allow to goto an auxiliary
instruction.

This patch is in preparation for the new ptwrite feature, which is based on
auxiliary instructions.
---
 gdb/record-btrace.c | 67 ++++++++++++++++++++++++++++++++++++---------
 1 file changed, 54 insertions(+), 13 deletions(-)

diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index cbdb8224ba3..0767dd12fee 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -2373,9 +2373,13 @@ record_btrace_single_step_forward (struct thread_info *tp)
     return btrace_step_stopped ();
 
   /* Skip gaps during replay.  If we end up at a gap (at the end of the trace),
-     jump back to the instruction at which we started.  */
+     jump back to the instruction at which we started.  If we're stepping a
+     BTRACE_INSN_AUX instruction, print the auxiliary data and skip the
+     instruction.  */
+
   start = *replay;
-  do
+
+  for (;;)
     {
       unsigned int steps;
 
@@ -2383,12 +2387,27 @@ record_btrace_single_step_forward (struct thread_info *tp)
 	 of the execution history.  */
       steps = btrace_insn_next (replay, 1);
       if (steps == 0)
+        {
+          *replay = start;
+          return btrace_step_no_history ();
+        }
+
+      const struct btrace_insn *insn = btrace_insn_get (replay);
+      if (insn == nullptr)
+	continue;
+
+      /* If we're stepping a BTRACE_INSN_AUX instruction, print the auxiliary
+	 data and skip the instruction.  */
+      if (insn->iclass == BTRACE_INSN_AUX)
 	{
-	  *replay = start;
-	  return btrace_step_no_history ();
+	  gdb_printf ("[%s]\n",
+		      btinfo->aux_data.at (insn->aux_data_index).c_str ());
+	  continue;
 	}
+
+      /* We have an instruction, we are done.  */
+      break;
     }
-  while (btrace_insn_get (replay) == NULL);
 
   /* Determine the end of the instruction trace.  */
   btrace_insn_end (&end, btinfo);
@@ -2419,9 +2438,12 @@ record_btrace_single_step_backward (struct thread_info *tp)
 
   /* If we can't step any further, we reached the end of the history.
      Skip gaps during replay.  If we end up at a gap (at the beginning of
-     the trace), jump back to the instruction at which we started.  */
+     the trace), jump back to the instruction at which we started.
+     If we're stepping a BTRACE_INSN_AUX instruction, print the auxiliary
+     data and skip the instruction.  */
   start = *replay;
-  do
+
+  for (;;)
     {
       unsigned int steps;
 
@@ -2431,8 +2453,22 @@ record_btrace_single_step_backward (struct thread_info *tp)
 	  *replay = start;
 	  return btrace_step_no_history ();
 	}
+
+      const struct btrace_insn *insn = btrace_insn_get (replay);
+      if (insn == nullptr)
+	continue;
+
+      /* Check if we're stepping a BTRACE_INSN_AUX instruction and skip it.  */
+      if (insn->iclass == BTRACE_INSN_AUX)
+	{
+	  gdb_printf ("[%s]\n",
+		      btinfo->aux_data.at (insn->aux_data_index).c_str ());
+	  continue;
+	}
+
+      /* We have an instruction, we are done.  */
+      break;
     }
-  while (btrace_insn_get (replay) == NULL);
 
   /* Check if we're stepping a breakpoint.
 
@@ -2854,25 +2890,30 @@ record_btrace_target::goto_record_end ()
 /* The goto_record method of target record-btrace.  */
 
 void
-record_btrace_target::goto_record (ULONGEST insn)
+record_btrace_target::goto_record (ULONGEST insn_number)
 {
   struct thread_info *tp;
   struct btrace_insn_iterator it;
   unsigned int number;
   int found;
 
-  number = insn;
+  number = insn_number;
 
   /* Check for wrap-arounds.  */
-  if (number != insn)
+  if (number != insn_number)
     error (_("Instruction number out of range."));
 
   tp = require_btrace_thread ();
 
   found = btrace_find_insn_by_number (&it, &tp->btrace, number);
 
-  /* Check if the instruction could not be found or is a gap.  */
-  if (found == 0 || btrace_insn_get (&it) == NULL)
+  /* Check if the instruction could not be found or is a gap or an
+     auxilliary instruction.  */
+  if (found == 0)
+    error (_("No such instruction."));
+
+  const struct btrace_insn *insn = btrace_insn_get (&it);
+  if ((insn == NULL) || (insn->iclass == BTRACE_INSN_AUX))
     error (_("No such instruction."));
 
   record_btrace_set_replay (tp, &it);
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 05/10] python: Introduce gdb.RecordAuxiliary class.
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
                   ` (4 preceding siblings ...)
  2022-10-21 11:59 ` [PATCH v7 04/10] btrace: Handle stepping and goto for auxiliary instructions Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59   ` Felix Willgerodt
  2022-10-21 11:59 ` [PATCH v7 06/10] python: Add clear() to gdb.Record Felix Willgerodt
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

Auxiliary instructions are no real instructions and get their own object
class, similar to gaps. gdb.Record.instruction_history is now possibly a
list of gdb.RecordInstruction, gdb.RecordGap or gdb.RecordAuxiliary
objects.

This patch is in preparation for the new ptwrite feature, which is based on
auxiliary instructions.
---
 gdb/doc/python.texi           | 13 +++++++
 gdb/python/py-record-btrace.c | 35 +++++++++++------
 gdb/python/py-record.c        | 73 ++++++++++++++++++++++++++++++++++-
 gdb/python/py-record.h        |  3 ++
 4 files changed, 111 insertions(+), 13 deletions(-)

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 2692211f388..8561bb6c8f1 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3892,6 +3892,19 @@ the current recording method.
 A human readable string with the reason for the gap.
 @end defvar
 
+Some @value{GDBN} features write auxiliary information into the execution
+history.  This information is represented by a @code{gdb.RecordAuxiliary} object
+in the instruction list.  It has the following attributes:
+
+@defvar RecordAuxiliary.number
+An integer identifying this auxiliary.  @code{number} corresponds to the numbers
+seen in @code{record instruction-history} (@pxref{Process Record and Replay}).
+@end defvar
+
+@defvar RecordAuxiliary.data
+A string representation of the auxiliary data.
+@end defvar
+
 A @code{gdb.RecordFunctionSegment} object has the following attributes:
 
 @defvar RecordFunctionSegment.number
diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c
index 85401010f0a..1dab097335b 100644
--- a/gdb/python/py-record-btrace.c
+++ b/gdb/python/py-record-btrace.c
@@ -45,7 +45,8 @@ struct btpy_list_object {
   /* Stride size.  */
   Py_ssize_t step;
 
-  /* Either &BTPY_CALL_TYPE or &RECPY_INSN_TYPE.  */
+  /* Either &recpy_func_type, &recpy_insn_type, &recpy_aux_type or
+     &recpy_gap_type.  */
   PyTypeObject* element_type;
 };
 
@@ -141,10 +142,11 @@ btrace_func_from_recpy_func (const PyObject * const pyobject)
 }
 
 /* Looks at the recorded item with the number NUMBER and create a
-   gdb.RecordInstruction or gdb.RecordGap object for it accordingly.  */
+   gdb.RecordInstruction, gdb.RecordGap or gdb.RecordAuxiliary object
+   for it accordingly.  */
 
 static PyObject *
-btpy_insn_or_gap_new (thread_info *tinfo, Py_ssize_t number)
+btpy_item_new (thread_info *tinfo, Py_ssize_t number)
 {
   btrace_insn_iterator iter;
   int err_code;
@@ -163,6 +165,14 @@ btpy_insn_or_gap_new (thread_info *tinfo, Py_ssize_t number)
       return recpy_gap_new (err_code, err_string, number);
     }
 
+  const struct btrace_insn *insn = btrace_insn_get (&iter);
+  gdb_assert (insn != nullptr);
+
+  if (insn->iclass == BTRACE_INSN_AUX)
+    return recpy_aux_new
+      (iter.btinfo->aux_data.at (insn->aux_data_index).c_str (), number);
+
+
   return recpy_insn_new (tinfo, RECORD_METHOD_BTRACE, number);
 }
 
@@ -441,8 +451,10 @@ btpy_list_length (PyObject *self)
 }
 
 /* Implementation of
-   BtraceList.__getitem__ (self, key) -> BtraceInstruction and
-   BtraceList.__getitem__ (self, key) -> BtraceFunctionCall.  */
+   BtraceList.__getitem__ (self, key) -> BtraceInstruction,
+   BtraceList.__getitem__ (self, key) -> BtraceFunctionCall,
+   BtraceList.__getitem__ (self, key) -> BtraceAuxilliary and
+   BtraceList.__getitem__ (self, key) -> BtraceGap.  */
 
 static PyObject *
 btpy_list_item (PyObject *self, Py_ssize_t index)
@@ -456,10 +468,10 @@ btpy_list_item (PyObject *self, Py_ssize_t index)
 
   number = obj->first + (obj->step * index);
 
-  if (obj->element_type == &recpy_insn_type)
-    return recpy_insn_new (obj->thread, RECORD_METHOD_BTRACE, number);
-  else
+  if (obj->element_type == &recpy_func_type)
     return recpy_func_new (obj->thread, RECORD_METHOD_BTRACE, number);
+  else
+    return btpy_item_new (obj->thread, number);
 }
 
 /* Implementation of BtraceList.__getitem__ (self, slice) -> BtraceList.  */
@@ -646,8 +658,7 @@ recpy_bt_replay_position (PyObject *self, void *closure)
   if (tinfo->btrace.replay == NULL)
     Py_RETURN_NONE;
 
-  return btpy_insn_or_gap_new (tinfo,
-			       btrace_insn_number (tinfo->btrace.replay));
+  return btpy_item_new (tinfo, btrace_insn_number (tinfo->btrace.replay));
 }
 
 /* Implementation of
@@ -669,7 +680,7 @@ recpy_bt_begin (PyObject *self, void *closure)
     Py_RETURN_NONE;
 
   btrace_insn_begin (&iterator, &tinfo->btrace);
-  return btpy_insn_or_gap_new (tinfo, btrace_insn_number (&iterator));
+  return btpy_item_new (tinfo, btrace_insn_number (&iterator));
 }
 
 /* Implementation of
@@ -691,7 +702,7 @@ recpy_bt_end (PyObject *self, void *closure)
     Py_RETURN_NONE;
 
   btrace_insn_end (&iterator, &tinfo->btrace);
-  return btpy_insn_or_gap_new (tinfo, btrace_insn_number (&iterator));
+  return btpy_item_new (tinfo, btrace_insn_number (&iterator));
 }
 
 /* Implementation of
diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c
index fd5cfee84eb..a7e091f3770 100644
--- a/gdb/python/py-record.c
+++ b/gdb/python/py-record.c
@@ -49,6 +49,12 @@ static PyTypeObject recpy_gap_type = {
   PyVarObject_HEAD_INIT (NULL, 0)
 };
 
+/* Python RecordAuxiliary type.  */
+
+PyTypeObject recpy_aux_type = {
+  PyVarObject_HEAD_INIT (nullptr, 0)
+};
+
 /* Python RecordGap object.  */
 struct recpy_gap_object
 {
@@ -64,6 +70,18 @@ struct recpy_gap_object
   Py_ssize_t number;
 };
 
+/* Python RecordAuxiliary object.  */
+typedef struct
+{
+  PyObject_HEAD
+
+  /* Auxiliary data.  */
+  const char *data;
+
+  /* Element number.  */
+  Py_ssize_t number;
+} recpy_aux_object;
+
 /* Implementation of record.method.  */
 
 static PyObject *
@@ -477,6 +495,43 @@ recpy_gap_reason_string (PyObject *self, void *closure)
   return PyUnicode_FromString (obj->reason_string);
 }
 
+/* Create a new gdb.Auxiliary object.  */
+
+PyObject *
+recpy_aux_new (const char *data, Py_ssize_t number)
+{
+  recpy_aux_object * const obj = PyObject_New (recpy_aux_object,
+					       &recpy_aux_type);
+
+  if (obj == nullptr)
+   return nullptr;
+
+  obj->data = data;
+  obj->number = number;
+
+  return (PyObject *) obj;
+}
+
+/* Implementation of Auxiliary.number [int].  */
+
+static PyObject *
+recpy_aux_number (PyObject *self, void *closure)
+{
+  const recpy_aux_object * const obj = (const recpy_aux_object *) self;
+
+  return gdb_py_object_from_longest (obj->number).release ();
+}
+
+/* Implementation of Auxiliary.data [str].  */
+
+static PyObject *
+recpy_aux_data (PyObject *self, void *closure)
+{
+  const recpy_aux_object * const obj = (const recpy_aux_object *) self;
+
+  return PyUnicode_FromString (obj->data);
+}
+
 /* Record method list.  */
 
 static PyMethodDef recpy_record_methods[] = {
@@ -542,6 +597,14 @@ static gdb_PyGetSetDef recpy_gap_getset[] = {
   { NULL }
 };
 
+/* RecordAuxiliary member list.  */
+
+static gdb_PyGetSetDef recpy_aux_getset[] = {
+  { "number", recpy_aux_number, nullptr, "element number", nullptr},
+  { "data", recpy_aux_data, nullptr, "data", nullptr},
+  { nullptr }
+};
+
 /* Sets up the record API in the gdb module.  */
 
 int
@@ -581,10 +644,18 @@ gdbpy_initialize_record (void)
   recpy_gap_type.tp_doc = "GDB recorded gap object";
   recpy_gap_type.tp_getset = recpy_gap_getset;
 
+  recpy_aux_type.tp_new = PyType_GenericNew;
+  recpy_aux_type.tp_flags = Py_TPFLAGS_DEFAULT;
+  recpy_aux_type.tp_basicsize = sizeof (recpy_aux_object);
+  recpy_aux_type.tp_name = "gdb.RecordAuxiliary";
+  recpy_aux_type.tp_doc = "GDB recorded auxiliary object";
+  recpy_aux_type.tp_getset = recpy_aux_getset;
+
   if (PyType_Ready (&recpy_record_type) < 0
       || PyType_Ready (&recpy_insn_type) < 0
       || PyType_Ready (&recpy_func_type) < 0
-      || PyType_Ready (&recpy_gap_type) < 0)
+      || PyType_Ready (&recpy_gap_type) < 0
+      || PyType_Ready (&recpy_aux_type) < 0)
     return -1;
   else
     return 0;
diff --git a/gdb/python/py-record.h b/gdb/python/py-record.h
index 2c8cfd6e4a5..d1d784e758e 100644
--- a/gdb/python/py-record.h
+++ b/gdb/python/py-record.h
@@ -71,4 +71,7 @@ extern PyObject *recpy_func_new (thread_info *thread, enum record_method method,
 extern PyObject *recpy_gap_new (int reason_code, const char *reason_string,
 				Py_ssize_t number);
 
+/* Create a new gdb.RecordGap object.  */
+extern PyObject *recpy_aux_new (const char *data, Py_ssize_t number);
+
 #endif /* PYTHON_PY_RECORD_H */
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 05/10] python: Introduce gdb.RecordAuxiliary class.
  2022-10-21 11:59 ` [PATCH v7 05/10] python: Introduce gdb.RecordAuxiliary class Felix Willgerodt
@ 2022-10-21 11:59   ` Felix Willgerodt
  0 siblings, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger; +Cc: Felix Willgerodt

Auxiliary instructions are no real instructions and get their own object
class, similar to gaps. gdb.Record.instruction_history is now possibly a
list of gdb.RecordInstruction, gdb.RecordGap or gdb.RecordAuxiliary
objects.

This patch is in preparation for the new ptwrite feature, which is based on
auxiliary instructions.
---
 gdb/doc/python.texi           | 13 +++++++
 gdb/python/py-record-btrace.c | 35 +++++++++++------
 gdb/python/py-record.c        | 73 ++++++++++++++++++++++++++++++++++-
 gdb/python/py-record.h        |  3 ++
 4 files changed, 111 insertions(+), 13 deletions(-)

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 2692211f388..8561bb6c8f1 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3892,6 +3892,19 @@ the current recording method.
 A human readable string with the reason for the gap.
 @end defvar
 
+Some @value{GDBN} features write auxiliary information into the execution
+history.  This information is represented by a @code{gdb.RecordAuxiliary} object
+in the instruction list.  It has the following attributes:
+
+@defvar RecordAuxiliary.number
+An integer identifying this auxiliary.  @code{number} corresponds to the numbers
+seen in @code{record instruction-history} (@pxref{Process Record and Replay}).
+@end defvar
+
+@defvar RecordAuxiliary.data
+A string representation of the auxiliary data.
+@end defvar
+
 A @code{gdb.RecordFunctionSegment} object has the following attributes:
 
 @defvar RecordFunctionSegment.number
diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c
index 85401010f0a..1dab097335b 100644
--- a/gdb/python/py-record-btrace.c
+++ b/gdb/python/py-record-btrace.c
@@ -45,7 +45,8 @@ struct btpy_list_object {
   /* Stride size.  */
   Py_ssize_t step;
 
-  /* Either &BTPY_CALL_TYPE or &RECPY_INSN_TYPE.  */
+  /* Either &recpy_func_type, &recpy_insn_type, &recpy_aux_type or
+     &recpy_gap_type.  */
   PyTypeObject* element_type;
 };
 
@@ -141,10 +142,11 @@ btrace_func_from_recpy_func (const PyObject * const pyobject)
 }
 
 /* Looks at the recorded item with the number NUMBER and create a
-   gdb.RecordInstruction or gdb.RecordGap object for it accordingly.  */
+   gdb.RecordInstruction, gdb.RecordGap or gdb.RecordAuxiliary object
+   for it accordingly.  */
 
 static PyObject *
-btpy_insn_or_gap_new (thread_info *tinfo, Py_ssize_t number)
+btpy_item_new (thread_info *tinfo, Py_ssize_t number)
 {
   btrace_insn_iterator iter;
   int err_code;
@@ -163,6 +165,14 @@ btpy_insn_or_gap_new (thread_info *tinfo, Py_ssize_t number)
       return recpy_gap_new (err_code, err_string, number);
     }
 
+  const struct btrace_insn *insn = btrace_insn_get (&iter);
+  gdb_assert (insn != nullptr);
+
+  if (insn->iclass == BTRACE_INSN_AUX)
+    return recpy_aux_new
+      (iter.btinfo->aux_data.at (insn->aux_data_index).c_str (), number);
+
+
   return recpy_insn_new (tinfo, RECORD_METHOD_BTRACE, number);
 }
 
@@ -441,8 +451,10 @@ btpy_list_length (PyObject *self)
 }
 
 /* Implementation of
-   BtraceList.__getitem__ (self, key) -> BtraceInstruction and
-   BtraceList.__getitem__ (self, key) -> BtraceFunctionCall.  */
+   BtraceList.__getitem__ (self, key) -> BtraceInstruction,
+   BtraceList.__getitem__ (self, key) -> BtraceFunctionCall,
+   BtraceList.__getitem__ (self, key) -> BtraceAuxilliary and
+   BtraceList.__getitem__ (self, key) -> BtraceGap.  */
 
 static PyObject *
 btpy_list_item (PyObject *self, Py_ssize_t index)
@@ -456,10 +468,10 @@ btpy_list_item (PyObject *self, Py_ssize_t index)
 
   number = obj->first + (obj->step * index);
 
-  if (obj->element_type == &recpy_insn_type)
-    return recpy_insn_new (obj->thread, RECORD_METHOD_BTRACE, number);
-  else
+  if (obj->element_type == &recpy_func_type)
     return recpy_func_new (obj->thread, RECORD_METHOD_BTRACE, number);
+  else
+    return btpy_item_new (obj->thread, number);
 }
 
 /* Implementation of BtraceList.__getitem__ (self, slice) -> BtraceList.  */
@@ -646,8 +658,7 @@ recpy_bt_replay_position (PyObject *self, void *closure)
   if (tinfo->btrace.replay == NULL)
     Py_RETURN_NONE;
 
-  return btpy_insn_or_gap_new (tinfo,
-			       btrace_insn_number (tinfo->btrace.replay));
+  return btpy_item_new (tinfo, btrace_insn_number (tinfo->btrace.replay));
 }
 
 /* Implementation of
@@ -669,7 +680,7 @@ recpy_bt_begin (PyObject *self, void *closure)
     Py_RETURN_NONE;
 
   btrace_insn_begin (&iterator, &tinfo->btrace);
-  return btpy_insn_or_gap_new (tinfo, btrace_insn_number (&iterator));
+  return btpy_item_new (tinfo, btrace_insn_number (&iterator));
 }
 
 /* Implementation of
@@ -691,7 +702,7 @@ recpy_bt_end (PyObject *self, void *closure)
     Py_RETURN_NONE;
 
   btrace_insn_end (&iterator, &tinfo->btrace);
-  return btpy_insn_or_gap_new (tinfo, btrace_insn_number (&iterator));
+  return btpy_item_new (tinfo, btrace_insn_number (&iterator));
 }
 
 /* Implementation of
diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c
index fd5cfee84eb..a7e091f3770 100644
--- a/gdb/python/py-record.c
+++ b/gdb/python/py-record.c
@@ -49,6 +49,12 @@ static PyTypeObject recpy_gap_type = {
   PyVarObject_HEAD_INIT (NULL, 0)
 };
 
+/* Python RecordAuxiliary type.  */
+
+PyTypeObject recpy_aux_type = {
+  PyVarObject_HEAD_INIT (nullptr, 0)
+};
+
 /* Python RecordGap object.  */
 struct recpy_gap_object
 {
@@ -64,6 +70,18 @@ struct recpy_gap_object
   Py_ssize_t number;
 };
 
+/* Python RecordAuxiliary object.  */
+typedef struct
+{
+  PyObject_HEAD
+
+  /* Auxiliary data.  */
+  const char *data;
+
+  /* Element number.  */
+  Py_ssize_t number;
+} recpy_aux_object;
+
 /* Implementation of record.method.  */
 
 static PyObject *
@@ -477,6 +495,43 @@ recpy_gap_reason_string (PyObject *self, void *closure)
   return PyUnicode_FromString (obj->reason_string);
 }
 
+/* Create a new gdb.Auxiliary object.  */
+
+PyObject *
+recpy_aux_new (const char *data, Py_ssize_t number)
+{
+  recpy_aux_object * const obj = PyObject_New (recpy_aux_object,
+					       &recpy_aux_type);
+
+  if (obj == nullptr)
+   return nullptr;
+
+  obj->data = data;
+  obj->number = number;
+
+  return (PyObject *) obj;
+}
+
+/* Implementation of Auxiliary.number [int].  */
+
+static PyObject *
+recpy_aux_number (PyObject *self, void *closure)
+{
+  const recpy_aux_object * const obj = (const recpy_aux_object *) self;
+
+  return gdb_py_object_from_longest (obj->number).release ();
+}
+
+/* Implementation of Auxiliary.data [str].  */
+
+static PyObject *
+recpy_aux_data (PyObject *self, void *closure)
+{
+  const recpy_aux_object * const obj = (const recpy_aux_object *) self;
+
+  return PyUnicode_FromString (obj->data);
+}
+
 /* Record method list.  */
 
 static PyMethodDef recpy_record_methods[] = {
@@ -542,6 +597,14 @@ static gdb_PyGetSetDef recpy_gap_getset[] = {
   { NULL }
 };
 
+/* RecordAuxiliary member list.  */
+
+static gdb_PyGetSetDef recpy_aux_getset[] = {
+  { "number", recpy_aux_number, nullptr, "element number", nullptr},
+  { "data", recpy_aux_data, nullptr, "data", nullptr},
+  { nullptr }
+};
+
 /* Sets up the record API in the gdb module.  */
 
 int
@@ -581,10 +644,18 @@ gdbpy_initialize_record (void)
   recpy_gap_type.tp_doc = "GDB recorded gap object";
   recpy_gap_type.tp_getset = recpy_gap_getset;
 
+  recpy_aux_type.tp_new = PyType_GenericNew;
+  recpy_aux_type.tp_flags = Py_TPFLAGS_DEFAULT;
+  recpy_aux_type.tp_basicsize = sizeof (recpy_aux_object);
+  recpy_aux_type.tp_name = "gdb.RecordAuxiliary";
+  recpy_aux_type.tp_doc = "GDB recorded auxiliary object";
+  recpy_aux_type.tp_getset = recpy_aux_getset;
+
   if (PyType_Ready (&recpy_record_type) < 0
       || PyType_Ready (&recpy_insn_type) < 0
       || PyType_Ready (&recpy_func_type) < 0
-      || PyType_Ready (&recpy_gap_type) < 0)
+      || PyType_Ready (&recpy_gap_type) < 0
+      || PyType_Ready (&recpy_aux_type) < 0)
     return -1;
   else
     return 0;
diff --git a/gdb/python/py-record.h b/gdb/python/py-record.h
index 2c8cfd6e4a5..d1d784e758e 100644
--- a/gdb/python/py-record.h
+++ b/gdb/python/py-record.h
@@ -71,4 +71,7 @@ extern PyObject *recpy_func_new (thread_info *thread, enum record_method method,
 extern PyObject *recpy_gap_new (int reason_code, const char *reason_string,
 				Py_ssize_t number);
 
+/* Create a new gdb.RecordGap object.  */
+extern PyObject *recpy_aux_new (const char *data, Py_ssize_t number);
+
 #endif /* PYTHON_PY_RECORD_H */
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 06/10] python: Add clear() to gdb.Record.
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
                   ` (5 preceding siblings ...)
  2022-10-21 11:59 ` [PATCH v7 05/10] python: Introduce gdb.RecordAuxiliary class Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59   ` Felix Willgerodt
  2022-10-21 11:59 ` [PATCH v7 07/10] btrace, gdbserver: Add ptwrite to btrace_config_pt Felix Willgerodt
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

This function allows to clear the trace data from python, forcing to
re-decode the trace for successive commands.
---
 gdb/doc/python.texi                           |  5 +++++
 gdb/python/py-record-btrace.c                 | 13 +++++++++++++
 gdb/python/py-record-btrace.h                 |  3 +++
 gdb/python/py-record.c                        | 16 ++++++++++++++++
 gdb/testsuite/gdb.python/py-record-btrace.exp |  6 +++++-
 5 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 8561bb6c8f1..2820e4d56e3 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3836,6 +3836,11 @@ A @code{gdb.Record} object has the following methods:
 Move the replay position to the given @var{instruction}.
 @end defun
 
+@defun Record.clear ()
+Clear the trace data of the current recording.  This forces re-decoding of the
+trace for successive commands.
+@end defun
+
 The common @code{gdb.Instruction} class that recording method specific
 instruction objects inherit from, has the following attributes:
 
diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c
index 1dab097335b..c09ba6271b5 100644
--- a/gdb/python/py-record-btrace.c
+++ b/gdb/python/py-record-btrace.c
@@ -802,6 +802,19 @@ recpy_bt_goto (PyObject *self, PyObject *args)
   Py_RETURN_NONE;
 }
 
+/* Implementation of BtraceRecord.clear (self) -> None.  */
+
+PyObject *
+recpy_bt_clear (PyObject *self, PyObject *args)
+{
+  const recpy_record_object * const record = (recpy_record_object *) self;
+  thread_info *const tinfo = record->thread;
+
+  btrace_clear (tinfo);
+
+  Py_RETURN_NONE;
+}
+
 /* BtraceList methods.  */
 
 static PyMethodDef btpy_list_methods[] =
diff --git a/gdb/python/py-record-btrace.h b/gdb/python/py-record-btrace.h
index 8ef26c860db..b25b121d255 100644
--- a/gdb/python/py-record-btrace.h
+++ b/gdb/python/py-record-btrace.h
@@ -31,6 +31,9 @@ extern PyObject *recpy_bt_format (PyObject *self, void *closure);
 /* Implementation of record.goto (instruction) -> None.  */
 extern PyObject *recpy_bt_goto (PyObject *self, PyObject *value);
 
+/* Implementation of BtraceRecord.clear (self) -> None.  */
+extern PyObject *recpy_bt_clear (PyObject *self, PyObject *args);
+
 /* Implementation of record.instruction_history [list].  */
 extern PyObject *recpy_bt_instruction_history (PyObject *self, void *closure);
 
diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c
index a7e091f3770..a908083a813 100644
--- a/gdb/python/py-record.c
+++ b/gdb/python/py-record.c
@@ -127,6 +127,19 @@ recpy_goto (PyObject *self, PyObject *value)
   return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
 }
 
+/* Implementation of record.clear () -> None.  */
+
+static PyObject *
+recpy_clear (PyObject *self, PyObject *value)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_clear (self, value);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
 /* Implementation of record.replay_position [instruction]  */
 
 static PyObject *
@@ -538,6 +551,9 @@ static PyMethodDef recpy_record_methods[] = {
   { "goto", recpy_goto, METH_VARARGS,
     "goto (instruction|function_call) -> None.\n\
 Rewind to given location."},
+  { "clear", recpy_clear, METH_VARARGS,
+    "clear () -> None.\n\
+Clears the trace."},
   { NULL }
 };
 
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index e9fdd06154e..82d887dbd18 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -88,7 +88,11 @@ with_test_prefix "instruction " {
     gdb_test "python print(repr(i.data))" "<memory at $hex>"
     gdb_test "python print(i.decoded)" ".*"
     gdb_test "python print(i.size)" "$decimal"
-    gdb_test "python print(i.is_speculative)" "False"
+    gdb_test "python print(i.is_speculative)" "False"    
+    gdb_test_no_output "python r.clear()"
+    gdb_test "python insn = r.instruction_history"
+    gdb_test_no_output "python i = insn\[0\]"
+    gdb_test "python print(i.size)" "$decimal"
 }
 
 with_test_prefix "function call" {
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 06/10] python: Add clear() to gdb.Record.
  2022-10-21 11:59 ` [PATCH v7 06/10] python: Add clear() to gdb.Record Felix Willgerodt
@ 2022-10-21 11:59   ` Felix Willgerodt
  0 siblings, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger; +Cc: Felix Willgerodt

This function allows to clear the trace data from python, forcing to
re-decode the trace for successive commands.
---
 gdb/doc/python.texi                           |  5 +++++
 gdb/python/py-record-btrace.c                 | 13 +++++++++++++
 gdb/python/py-record-btrace.h                 |  3 +++
 gdb/python/py-record.c                        | 16 ++++++++++++++++
 gdb/testsuite/gdb.python/py-record-btrace.exp |  6 +++++-
 5 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 8561bb6c8f1..2820e4d56e3 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3836,6 +3836,11 @@ A @code{gdb.Record} object has the following methods:
 Move the replay position to the given @var{instruction}.
 @end defun
 
+@defun Record.clear ()
+Clear the trace data of the current recording.  This forces re-decoding of the
+trace for successive commands.
+@end defun
+
 The common @code{gdb.Instruction} class that recording method specific
 instruction objects inherit from, has the following attributes:
 
diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c
index 1dab097335b..c09ba6271b5 100644
--- a/gdb/python/py-record-btrace.c
+++ b/gdb/python/py-record-btrace.c
@@ -802,6 +802,19 @@ recpy_bt_goto (PyObject *self, PyObject *args)
   Py_RETURN_NONE;
 }
 
+/* Implementation of BtraceRecord.clear (self) -> None.  */
+
+PyObject *
+recpy_bt_clear (PyObject *self, PyObject *args)
+{
+  const recpy_record_object * const record = (recpy_record_object *) self;
+  thread_info *const tinfo = record->thread;
+
+  btrace_clear (tinfo);
+
+  Py_RETURN_NONE;
+}
+
 /* BtraceList methods.  */
 
 static PyMethodDef btpy_list_methods[] =
diff --git a/gdb/python/py-record-btrace.h b/gdb/python/py-record-btrace.h
index 8ef26c860db..b25b121d255 100644
--- a/gdb/python/py-record-btrace.h
+++ b/gdb/python/py-record-btrace.h
@@ -31,6 +31,9 @@ extern PyObject *recpy_bt_format (PyObject *self, void *closure);
 /* Implementation of record.goto (instruction) -> None.  */
 extern PyObject *recpy_bt_goto (PyObject *self, PyObject *value);
 
+/* Implementation of BtraceRecord.clear (self) -> None.  */
+extern PyObject *recpy_bt_clear (PyObject *self, PyObject *args);
+
 /* Implementation of record.instruction_history [list].  */
 extern PyObject *recpy_bt_instruction_history (PyObject *self, void *closure);
 
diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c
index a7e091f3770..a908083a813 100644
--- a/gdb/python/py-record.c
+++ b/gdb/python/py-record.c
@@ -127,6 +127,19 @@ recpy_goto (PyObject *self, PyObject *value)
   return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
 }
 
+/* Implementation of record.clear () -> None.  */
+
+static PyObject *
+recpy_clear (PyObject *self, PyObject *value)
+{
+  const recpy_record_object * const obj = (recpy_record_object *) self;
+
+  if (obj->method == RECORD_METHOD_BTRACE)
+    return recpy_bt_clear (self, value);
+
+  return PyErr_Format (PyExc_NotImplementedError, _("Not implemented."));
+}
+
 /* Implementation of record.replay_position [instruction]  */
 
 static PyObject *
@@ -538,6 +551,9 @@ static PyMethodDef recpy_record_methods[] = {
   { "goto", recpy_goto, METH_VARARGS,
     "goto (instruction|function_call) -> None.\n\
 Rewind to given location."},
+  { "clear", recpy_clear, METH_VARARGS,
+    "clear () -> None.\n\
+Clears the trace."},
   { NULL }
 };
 
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index e9fdd06154e..82d887dbd18 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -88,7 +88,11 @@ with_test_prefix "instruction " {
     gdb_test "python print(repr(i.data))" "<memory at $hex>"
     gdb_test "python print(i.decoded)" ".*"
     gdb_test "python print(i.size)" "$decimal"
-    gdb_test "python print(i.is_speculative)" "False"
+    gdb_test "python print(i.is_speculative)" "False"    
+    gdb_test_no_output "python r.clear()"
+    gdb_test "python insn = r.instruction_history"
+    gdb_test_no_output "python i = insn\[0\]"
+    gdb_test "python print(i.size)" "$decimal"
 }
 
 with_test_prefix "function call" {
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 07/10] btrace, gdbserver: Add ptwrite to btrace_config_pt.
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
                   ` (6 preceding siblings ...)
  2022-10-21 11:59 ` [PATCH v7 06/10] python: Add clear() to gdb.Record Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59   ` Felix Willgerodt
  2022-10-21 11:59 ` [PATCH v7 08/10] btrace, linux: Enable ptwrite packets Felix Willgerodt
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

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(-)

diff --git a/gdb/btrace.c b/gdb/btrace.c
index 4a1b10b7c81..67555e6897d 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -2273,7 +2273,7 @@ parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser,
 			  std::vector<gdb_xml_value> &attributes)
 {
   struct btrace_config *conf;
-  struct gdb_xml_value *size;
+  struct gdb_xml_value *size, *ptwrite;
 
   conf = (struct btrace_config *) user_data;
   conf->format = BTRACE_FORMAT_PT;
@@ -2282,10 +2282,16 @@ parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser,
   size = xml_find_attribute (attributes, "size");
   if (size != NULL)
     conf->pt.size = (unsigned int) *(ULONGEST *) size->value.get ();
+
+  ptwrite = xml_find_attribute (attributes, "ptwrite");
+  if (ptwrite != nullptr)
+    conf->pt.ptwrite = (bool) *(ULONGEST *) ptwrite->value.get ();
 }
 
 static const struct gdb_xml_attribute btrace_conf_pt_attributes[] = {
   { "size", GDB_XML_AF_OPTIONAL, gdb_xml_parse_attr_ulongest, NULL },
+  { "ptwrite", GDB_XML_AF_OPTIONAL, gdb_xml_parse_attr_enum,
+    gdb_xml_enums_boolean },
   { NULL, GDB_XML_AF_NONE, NULL, NULL }
 };
 
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 1daecaf643a..a9db196bccb 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -43111,6 +43111,11 @@ These are the currently defined stub features and their properties:
 @tab @samp{-}
 @tab Yes
 
+@item @samp{Qbtrace-conf:pt:ptwrite}
+@tab Yes
+@tab @samp{-}
+@tab Yes
+
 @item @samp{QNonStop}
 @tab No
 @tab @samp{-}
@@ -43422,6 +43427,9 @@ The remote stub understands the @samp{Qbtrace-conf:bts:size} packet.
 @item Qbtrace-conf:pt:size
 The remote stub understands the @samp{Qbtrace-conf:pt:size} packet.
 
+@item Qbtrace-conf:pt:ptwrite
+The remote stub understands the @samp{Qbtrace-conf:pt:ptwrite} packet.
+
 @item swbreak
 The remote stub reports the @samp{swbreak} stop reason for memory
 breakpoints.
@@ -43929,6 +43937,18 @@ The ring buffer size has been set.
 A badly formed request or an error was encountered.
 @end table
 
+@item Qbtrace-conf:pt:ptwrite=@var{(yes|no)}
+Indicate support for @code{PTWRITE} packets.  This allows for backwards
+compatibility.
+
+Reply:
+@table @samp
+@item OK
+The ptwrite config parameter has been set.
+@item E.errtext
+A badly formed request or an error was encountered.
+@end table
+
 @end table
 
 @node Architecture-Specific Protocol Details
@@ -46577,6 +46597,7 @@ The formal DTD for the branch trace configuration format is given below:
 
 <!ELEMENT pt	EMPTY>
 <!ATTLIST pt	size	CDATA	#IMPLIED>
+<!ATTLIST pt	ptwrite	(yes | no)	#IMPLIED>
 @end smallexample
 
 @include agentexpr.texi
diff --git a/gdb/features/btrace-conf.dtd b/gdb/features/btrace-conf.dtd
index c71b11f2087..6571515c264 100644
--- 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>
diff --git a/gdb/remote.c b/gdb/remote.c
index 5118ecd0a31..9de81ccef52 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2202,6 +2202,9 @@ enum {
   /* Support for the Qbtrace-conf:pt:size packet.  */
   PACKET_Qbtrace_conf_pt_size,
 
+  /* Support for the Qbtrace-conf:pt:ptwrite packet.  */
+  PACKET_Qbtrace_conf_pt_ptwrite,
+
   /* Support for exec events.  */
   PACKET_exec_event_feature,
 
@@ -5418,6 +5421,8 @@ static const struct protocol_feature remote_protocol_features[] = {
     PACKET_exec_event_feature },
   { "Qbtrace-conf:pt:size", PACKET_DISABLE, remote_supported_packet,
     PACKET_Qbtrace_conf_pt_size },
+  { "Qbtrace-conf:pt:ptwrite", PACKET_DISABLE, remote_supported_packet,
+    PACKET_Qbtrace_conf_pt_ptwrite },
   { "vContSupported", PACKET_DISABLE, remote_supported_packet, PACKET_vContSupported },
   { "QThreadEvents", PACKET_DISABLE, remote_supported_packet, PACKET_QThreadEvents },
   { "no-resumed", PACKET_DISABLE, remote_supported_packet, PACKET_no_resumed },
@@ -14042,6 +14047,28 @@ remote_target::btrace_sync_conf (const btrace_config *conf)
 
       rs->btrace_config.pt.size = conf->pt.size;
     }
+
+  packet = &remote_protocol_packets[PACKET_Qbtrace_conf_pt_ptwrite];
+  if (packet_config_support (packet) == PACKET_ENABLE
+      && conf->pt.ptwrite != rs->btrace_config.pt.ptwrite)
+    {
+      pos = buf;
+      const char *ptw = conf->pt.ptwrite ? "yes" : "no";
+      pos += xsnprintf (pos, endbuf - pos, "%s=\"%s\"", packet->name, ptw);
+
+      putpkt (buf);
+      getpkt (&rs->buf, 0);
+
+      if (packet_ok (buf, packet) == PACKET_ERROR)
+	{
+	  if (buf[0] == 'E' && buf[1] == '.')
+	    error (_("Failed to sync ptwrite config: %s"), buf + 2);
+	  else
+	    error (_("Failed to sync ptwrite config."));
+	}
+
+      rs->btrace_config.pt.ptwrite = conf->pt.ptwrite;
+    }
 }
 
 /* Read TP's btrace configuration from the target and store it into CONF.  */
@@ -15258,6 +15285,9 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL,
   add_packet_config_cmd (&remote_protocol_packets[PACKET_Qbtrace_conf_pt_size],
        "Qbtrace-conf:pt:size", "btrace-conf-pt-size", 0);
 
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_Qbtrace_conf_pt_ptwrite],
+       "Qbtrace-conf:pt:ptwrite", "btrace-conf-pt-ptwrite", 0);
+
   add_packet_config_cmd (&remote_protocol_packets[PACKET_vContSupported],
 			 "vContSupported", "verbose-resume-supported", 0);
 
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 1676328fc88..8c4bcc97ff9 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6867,6 +6867,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);
+	  buffer_xml_printf (buffer, " ptwrite=\"%s\"",
+			     conf->pt.ptwrite ? "yes" : "no");
 	  buffer_xml_printf (buffer, "/>\n");
 	  break;
 	}
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index 366a843ea89..4bcd7306331 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -542,6 +542,23 @@ handle_btrace_conf_general_set (char *own_buf)
 
       current_btrace_conf.pt.size = (unsigned int) size;
     }
+  else if (strncmp (op, "pt:ptwrite=", strlen ("pt:ptwrite=")) == 0)
+    {
+      bool ptwrite;
+
+      op += strlen ("pt:ptwrite=");
+      if (strncmp (op, "\"yes\"", strlen ("\"yes\"")) == 0)
+	ptwrite = true;
+      else if (strncmp (op, "\"no\"", strlen ("\"no\"")) == 0)
+	ptwrite = false;
+      else
+	{
+	  strcpy (own_buf, "E.Bad ptwrite value.");
+	  return -1;
+	}
+
+      current_btrace_conf.pt.ptwrite = ptwrite;
+    }
   else
     {
       strcpy (own_buf, "E.Bad Qbtrace configuration option.");
@@ -2162,6 +2179,7 @@ supported_btrace_packets (char *buf)
   strcat (buf, ";Qbtrace-conf:bts:size+");
   strcat (buf, ";Qbtrace:pt+");
   strcat (buf, ";Qbtrace-conf:pt:size+");
+  strcat (buf, ";Qbtrace-conf:pt:ptwrite+");
   strcat (buf, ";Qbtrace:off+");
   strcat (buf, ";qXfer:btrace:read+");
   strcat (buf, ";qXfer:btrace-conf:read+");
diff --git a/gdbsupport/btrace-common.h b/gdbsupport/btrace-common.h
index 3c55ae92185..74708891923 100644
--- a/gdbsupport/btrace-common.h
+++ b/gdbsupport/btrace-common.h
@@ -117,6 +117,12 @@ struct btrace_config_pt
      This is unsigned int and not size_t since it is registered as
      control variable for "set record btrace pt buffer-size".  */
   unsigned int size;
+
+  /* Configuration bit for ptwrite packets.
+
+     If both gdb and gdbserver support this, gdb will try to enable ptwrite
+     packets when tracing is started.  */
+  bool ptwrite;
 };
 
 /* A branch tracing configuration.
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 07/10] btrace, gdbserver: Add ptwrite to btrace_config_pt.
  2022-10-21 11:59 ` [PATCH v7 07/10] btrace, gdbserver: Add ptwrite to btrace_config_pt Felix Willgerodt
@ 2022-10-21 11:59   ` Felix Willgerodt
  0 siblings, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger; +Cc: Felix Willgerodt

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(-)

diff --git a/gdb/btrace.c b/gdb/btrace.c
index 4a1b10b7c81..67555e6897d 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -2273,7 +2273,7 @@ parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser,
 			  std::vector<gdb_xml_value> &attributes)
 {
   struct btrace_config *conf;
-  struct gdb_xml_value *size;
+  struct gdb_xml_value *size, *ptwrite;
 
   conf = (struct btrace_config *) user_data;
   conf->format = BTRACE_FORMAT_PT;
@@ -2282,10 +2282,16 @@ parse_xml_btrace_conf_pt (struct gdb_xml_parser *parser,
   size = xml_find_attribute (attributes, "size");
   if (size != NULL)
     conf->pt.size = (unsigned int) *(ULONGEST *) size->value.get ();
+
+  ptwrite = xml_find_attribute (attributes, "ptwrite");
+  if (ptwrite != nullptr)
+    conf->pt.ptwrite = (bool) *(ULONGEST *) ptwrite->value.get ();
 }
 
 static const struct gdb_xml_attribute btrace_conf_pt_attributes[] = {
   { "size", GDB_XML_AF_OPTIONAL, gdb_xml_parse_attr_ulongest, NULL },
+  { "ptwrite", GDB_XML_AF_OPTIONAL, gdb_xml_parse_attr_enum,
+    gdb_xml_enums_boolean },
   { NULL, GDB_XML_AF_NONE, NULL, NULL }
 };
 
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 1daecaf643a..a9db196bccb 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -43111,6 +43111,11 @@ These are the currently defined stub features and their properties:
 @tab @samp{-}
 @tab Yes
 
+@item @samp{Qbtrace-conf:pt:ptwrite}
+@tab Yes
+@tab @samp{-}
+@tab Yes
+
 @item @samp{QNonStop}
 @tab No
 @tab @samp{-}
@@ -43422,6 +43427,9 @@ The remote stub understands the @samp{Qbtrace-conf:bts:size} packet.
 @item Qbtrace-conf:pt:size
 The remote stub understands the @samp{Qbtrace-conf:pt:size} packet.
 
+@item Qbtrace-conf:pt:ptwrite
+The remote stub understands the @samp{Qbtrace-conf:pt:ptwrite} packet.
+
 @item swbreak
 The remote stub reports the @samp{swbreak} stop reason for memory
 breakpoints.
@@ -43929,6 +43937,18 @@ The ring buffer size has been set.
 A badly formed request or an error was encountered.
 @end table
 
+@item Qbtrace-conf:pt:ptwrite=@var{(yes|no)}
+Indicate support for @code{PTWRITE} packets.  This allows for backwards
+compatibility.
+
+Reply:
+@table @samp
+@item OK
+The ptwrite config parameter has been set.
+@item E.errtext
+A badly formed request or an error was encountered.
+@end table
+
 @end table
 
 @node Architecture-Specific Protocol Details
@@ -46577,6 +46597,7 @@ The formal DTD for the branch trace configuration format is given below:
 
 <!ELEMENT pt	EMPTY>
 <!ATTLIST pt	size	CDATA	#IMPLIED>
+<!ATTLIST pt	ptwrite	(yes | no)	#IMPLIED>
 @end smallexample
 
 @include agentexpr.texi
diff --git a/gdb/features/btrace-conf.dtd b/gdb/features/btrace-conf.dtd
index c71b11f2087..6571515c264 100644
--- 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>
diff --git a/gdb/remote.c b/gdb/remote.c
index 5118ecd0a31..9de81ccef52 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2202,6 +2202,9 @@ enum {
   /* Support for the Qbtrace-conf:pt:size packet.  */
   PACKET_Qbtrace_conf_pt_size,
 
+  /* Support for the Qbtrace-conf:pt:ptwrite packet.  */
+  PACKET_Qbtrace_conf_pt_ptwrite,
+
   /* Support for exec events.  */
   PACKET_exec_event_feature,
 
@@ -5418,6 +5421,8 @@ static const struct protocol_feature remote_protocol_features[] = {
     PACKET_exec_event_feature },
   { "Qbtrace-conf:pt:size", PACKET_DISABLE, remote_supported_packet,
     PACKET_Qbtrace_conf_pt_size },
+  { "Qbtrace-conf:pt:ptwrite", PACKET_DISABLE, remote_supported_packet,
+    PACKET_Qbtrace_conf_pt_ptwrite },
   { "vContSupported", PACKET_DISABLE, remote_supported_packet, PACKET_vContSupported },
   { "QThreadEvents", PACKET_DISABLE, remote_supported_packet, PACKET_QThreadEvents },
   { "no-resumed", PACKET_DISABLE, remote_supported_packet, PACKET_no_resumed },
@@ -14042,6 +14047,28 @@ remote_target::btrace_sync_conf (const btrace_config *conf)
 
       rs->btrace_config.pt.size = conf->pt.size;
     }
+
+  packet = &remote_protocol_packets[PACKET_Qbtrace_conf_pt_ptwrite];
+  if (packet_config_support (packet) == PACKET_ENABLE
+      && conf->pt.ptwrite != rs->btrace_config.pt.ptwrite)
+    {
+      pos = buf;
+      const char *ptw = conf->pt.ptwrite ? "yes" : "no";
+      pos += xsnprintf (pos, endbuf - pos, "%s=\"%s\"", packet->name, ptw);
+
+      putpkt (buf);
+      getpkt (&rs->buf, 0);
+
+      if (packet_ok (buf, packet) == PACKET_ERROR)
+	{
+	  if (buf[0] == 'E' && buf[1] == '.')
+	    error (_("Failed to sync ptwrite config: %s"), buf + 2);
+	  else
+	    error (_("Failed to sync ptwrite config."));
+	}
+
+      rs->btrace_config.pt.ptwrite = conf->pt.ptwrite;
+    }
 }
 
 /* Read TP's btrace configuration from the target and store it into CONF.  */
@@ -15258,6 +15285,9 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL,
   add_packet_config_cmd (&remote_protocol_packets[PACKET_Qbtrace_conf_pt_size],
        "Qbtrace-conf:pt:size", "btrace-conf-pt-size", 0);
 
+  add_packet_config_cmd (&remote_protocol_packets[PACKET_Qbtrace_conf_pt_ptwrite],
+       "Qbtrace-conf:pt:ptwrite", "btrace-conf-pt-ptwrite", 0);
+
   add_packet_config_cmd (&remote_protocol_packets[PACKET_vContSupported],
 			 "vContSupported", "verbose-resume-supported", 0);
 
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 1676328fc88..8c4bcc97ff9 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -6867,6 +6867,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);
+	  buffer_xml_printf (buffer, " ptwrite=\"%s\"",
+			     conf->pt.ptwrite ? "yes" : "no");
 	  buffer_xml_printf (buffer, "/>\n");
 	  break;
 	}
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index 366a843ea89..4bcd7306331 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -542,6 +542,23 @@ handle_btrace_conf_general_set (char *own_buf)
 
       current_btrace_conf.pt.size = (unsigned int) size;
     }
+  else if (strncmp (op, "pt:ptwrite=", strlen ("pt:ptwrite=")) == 0)
+    {
+      bool ptwrite;
+
+      op += strlen ("pt:ptwrite=");
+      if (strncmp (op, "\"yes\"", strlen ("\"yes\"")) == 0)
+	ptwrite = true;
+      else if (strncmp (op, "\"no\"", strlen ("\"no\"")) == 0)
+	ptwrite = false;
+      else
+	{
+	  strcpy (own_buf, "E.Bad ptwrite value.");
+	  return -1;
+	}
+
+      current_btrace_conf.pt.ptwrite = ptwrite;
+    }
   else
     {
       strcpy (own_buf, "E.Bad Qbtrace configuration option.");
@@ -2162,6 +2179,7 @@ supported_btrace_packets (char *buf)
   strcat (buf, ";Qbtrace-conf:bts:size+");
   strcat (buf, ";Qbtrace:pt+");
   strcat (buf, ";Qbtrace-conf:pt:size+");
+  strcat (buf, ";Qbtrace-conf:pt:ptwrite+");
   strcat (buf, ";Qbtrace:off+");
   strcat (buf, ";qXfer:btrace:read+");
   strcat (buf, ";qXfer:btrace-conf:read+");
diff --git a/gdbsupport/btrace-common.h b/gdbsupport/btrace-common.h
index 3c55ae92185..74708891923 100644
--- a/gdbsupport/btrace-common.h
+++ b/gdbsupport/btrace-common.h
@@ -117,6 +117,12 @@ struct btrace_config_pt
      This is unsigned int and not size_t since it is registered as
      control variable for "set record btrace pt buffer-size".  */
   unsigned int size;
+
+  /* Configuration bit for ptwrite packets.
+
+     If both gdb and gdbserver support this, gdb will try to enable ptwrite
+     packets when tracing is started.  */
+  bool ptwrite;
 };
 
 /* A branch tracing configuration.
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 08/10] btrace, linux: Enable ptwrite packets.
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
                   ` (7 preceding siblings ...)
  2022-10-21 11:59 ` [PATCH v7 07/10] btrace, gdbserver: Add ptwrite to btrace_config_pt Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59   ` Felix Willgerodt
  2022-10-21 11:59 ` [PATCH v7 09/10] btrace, python: Enable ptwrite filter registration Felix Willgerodt
  2022-11-09 13:16 ` [PING] [PATCH v7 00/10] Extensions for PTWRITE Willgerodt, Felix
  10 siblings, 1 reply; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

Enable ptwrite in the PT config, if it is supported by the kernel.
---
 gdb/nat/linux-btrace.c | 29 +++++++++++++++++++++++++++++
 gdb/record-btrace.c    |  5 +++++
 2 files changed, 34 insertions(+)

diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c
index 4911630ba5c..701ea948610 100644
--- a/gdb/nat/linux-btrace.c
+++ b/gdb/nat/linux-btrace.c
@@ -415,6 +415,29 @@ cpu_supports_bts (void)
     }
 }
 
+/* Check whether the linux target supports Intel Processor Trace PTWRITE.  */
+
+static bool
+linux_supports_ptwrite ()
+{
+  static const char filename[]
+      = "/sys/bus/event_source/devices/intel_pt/caps/ptwrite";
+  gdb_file_up file = gdb_fopen_cloexec (filename, "r");
+
+  if (file.get () == nullptr)
+    return false;
+
+  int status, found = fscanf (file.get (), "%d", &status);
+
+  if (found != 1)
+    {
+      warning (_("Failed to determine ptwrite support from %s."), filename);
+      return false;
+    }
+
+  return status == 1;
+}
+
 /* The perf_event_open syscall failed.  Try to print a helpful error
    message.  */
 
@@ -624,6 +647,12 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf)
   pt->attr.exclude_hv = 1;
   pt->attr.exclude_idle = 1;
 
+  if (conf->ptwrite && linux_supports_ptwrite ())
+    {
+      pt->attr.config |= 0x1000;
+      tinfo->conf.pt.ptwrite = conf->ptwrite;
+    }
+
   errno = 0;
   scoped_fd fd (syscall (SYS_perf_event_open, &pt->attr, pid, -1, -1, 0));
   if (fd.get () < 0)
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 0767dd12fee..203d994a306 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -3286,4 +3286,9 @@ to see the actual buffer size."), NULL, show_record_pt_buffer_size_value,
 
   record_btrace_conf.bts.size = 64 * 1024;
   record_btrace_conf.pt.size = 16 * 1024;
+#if (LIBIPT_VERSION >= 0x200)
+  record_btrace_conf.pt.ptwrite = true;
+#else
+  record_btrace_conf.pt.ptwrite = false;
+#endif
 }
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 08/10] btrace, linux: Enable ptwrite packets.
  2022-10-21 11:59 ` [PATCH v7 08/10] btrace, linux: Enable ptwrite packets Felix Willgerodt
@ 2022-10-21 11:59   ` Felix Willgerodt
  0 siblings, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger; +Cc: Felix Willgerodt

Enable ptwrite in the PT config, if it is supported by the kernel.
---
 gdb/nat/linux-btrace.c | 29 +++++++++++++++++++++++++++++
 gdb/record-btrace.c    |  5 +++++
 2 files changed, 34 insertions(+)

diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c
index 4911630ba5c..701ea948610 100644
--- a/gdb/nat/linux-btrace.c
+++ b/gdb/nat/linux-btrace.c
@@ -415,6 +415,29 @@ cpu_supports_bts (void)
     }
 }
 
+/* Check whether the linux target supports Intel Processor Trace PTWRITE.  */
+
+static bool
+linux_supports_ptwrite ()
+{
+  static const char filename[]
+      = "/sys/bus/event_source/devices/intel_pt/caps/ptwrite";
+  gdb_file_up file = gdb_fopen_cloexec (filename, "r");
+
+  if (file.get () == nullptr)
+    return false;
+
+  int status, found = fscanf (file.get (), "%d", &status);
+
+  if (found != 1)
+    {
+      warning (_("Failed to determine ptwrite support from %s."), filename);
+      return false;
+    }
+
+  return status == 1;
+}
+
 /* The perf_event_open syscall failed.  Try to print a helpful error
    message.  */
 
@@ -624,6 +647,12 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf)
   pt->attr.exclude_hv = 1;
   pt->attr.exclude_idle = 1;
 
+  if (conf->ptwrite && linux_supports_ptwrite ())
+    {
+      pt->attr.config |= 0x1000;
+      tinfo->conf.pt.ptwrite = conf->ptwrite;
+    }
+
   errno = 0;
   scoped_fd fd (syscall (SYS_perf_event_open, &pt->attr, pid, -1, -1, 0));
   if (fd.get () < 0)
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 0767dd12fee..203d994a306 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -3286,4 +3286,9 @@ to see the actual buffer size."), NULL, show_record_pt_buffer_size_value,
 
   record_btrace_conf.bts.size = 64 * 1024;
   record_btrace_conf.pt.size = 16 * 1024;
+#if (LIBIPT_VERSION >= 0x200)
+  record_btrace_conf.pt.ptwrite = true;
+#else
+  record_btrace_conf.pt.ptwrite = false;
+#endif
 }
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 09/10] btrace, python: Enable ptwrite filter registration.
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
                   ` (8 preceding siblings ...)
  2022-10-21 11:59 ` [PATCH v7 08/10] btrace, linux: Enable ptwrite packets Felix Willgerodt
@ 2022-10-21 11:59 ` Felix Willgerodt
  2022-10-21 11:59   ` Felix Willgerodt
  2022-11-09 13:16 ` [PING] [PATCH v7 00/10] Extensions for PTWRITE Willgerodt, Felix
  10 siblings, 1 reply; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger

With this patch a default ptwrite filter is registered upon start of GDB.
It prints the plain ptwrite payload as hex.  The default filter can be
overwritten by registering a custom filter in python or by registering
"None", for no output at all.  Registering a filter function creates per
thread copies to allow unique internal states per thread.
---
 gdb/btrace.c                   |  4 ++
 gdb/btrace.h                   |  8 ++++
 gdb/data-directory/Makefile.in |  1 +
 gdb/extension-priv.h           |  5 ++
 gdb/extension.c                | 13 +++++
 gdb/extension.h                |  3 ++
 gdb/guile/guile.c              |  1 +
 gdb/python/lib/gdb/ptwrite.py  | 80 +++++++++++++++++++++++++++++++
 gdb/python/py-record-btrace.c  | 88 ++++++++++++++++++++++++++++++++++
 gdb/python/py-record-btrace.h  |  8 ++++
 gdb/python/python-internal.h   |  3 ++
 gdb/python/python.c            |  2 +
 12 files changed, 216 insertions(+)
 create mode 100644 gdb/python/lib/gdb/ptwrite.py

diff --git a/gdb/btrace.c b/gdb/btrace.c
index 67555e6897d..e6ded61883b 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -34,6 +34,7 @@
 #include "gdbsupport/rsp-low.h"
 #include "gdbcmd.h"
 #include "cli/cli-utils.h"
+#include "extension.h"
 #include "gdbarch.h"
 
 /* For maintenance commands.  */
@@ -1317,6 +1318,9 @@ ftrace_add_pt (struct btrace_thread_info *btinfo,
   uint64_t offset;
   int status;
 
+  /* Register the ptwrite filter.  */
+  apply_ext_lang_ptwrite_filter (btinfo);
+
   for (;;)
     {
       struct pt_insn insn;
diff --git a/gdb/btrace.h b/gdb/btrace.h
index 36870d9b2ec..08acf3c5929 100644
--- a/gdb/btrace.h
+++ b/gdb/btrace.h
@@ -352,6 +352,14 @@ struct btrace_thread_info
      displaying or stepping through the execution history.  */
   std::vector<std::string> aux_data;
 
+  /* Function pointer to the ptwrite callback.  Returns the string returned
+     by the ptwrite filter function.  */
+  std::string (*ptw_callback_fun) (const uint64_t payload, const uint64_t ip,
+				   const void *ptw_context) = nullptr;
+
+  /* Context for the ptw_callback_fun.  */
+  void *ptw_context = nullptr;
+
   /* The function level offset.  When added to each function's LEVEL,
      this normalizes the function levels such that the smallest level
      becomes zero.  */
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
index cf5226f3961..506c16af4b5 100644
--- a/gdb/data-directory/Makefile.in
+++ b/gdb/data-directory/Makefile.in
@@ -75,6 +75,7 @@ PYTHON_FILE_LIST = \
 	gdb/frames.py \
 	gdb/printing.py \
 	gdb/prompt.py \
+	gdb/ptwrite.py \
 	gdb/styling.py \
 	gdb/types.py \
 	gdb/unwinder.py \
diff --git a/gdb/extension-priv.h b/gdb/extension-priv.h
index 50e9337af6e..972bd444191 100644
--- a/gdb/extension-priv.h
+++ b/gdb/extension-priv.h
@@ -183,6 +183,11 @@ struct extension_language_ops
      enum ext_lang_frame_args args_type,
      struct ui_out *out, int frame_low, int frame_high);
 
+  /* Used for registering the ptwrite filter to the current thread.  */
+  void (*apply_ptwrite_filter)
+    (const struct extension_language_defn *extlang,
+     struct btrace_thread_info *btinfo);
+
   /* Update values held by the extension language when OBJFILE is discarded.
      New global types must be created for every such value, which must then be
      updated to use the new types.
diff --git a/gdb/extension.c b/gdb/extension.c
index 8cbd80f45d5..ed45b378e4a 100644
--- a/gdb/extension.c
+++ b/gdb/extension.c
@@ -550,6 +550,19 @@ apply_ext_lang_frame_filter (frame_info_ptr frame,
   return EXT_LANG_BT_NO_FILTERS;
 }
 
+/* Used for registering the ptwrite filter to the current thread.  */
+
+void
+apply_ext_lang_ptwrite_filter (btrace_thread_info *btinfo)
+{
+  for (const struct extension_language_defn *extlang : extension_languages)
+    {
+      if (extlang->ops != nullptr
+	  && extlang->ops->apply_ptwrite_filter != nullptr)
+	extlang->ops->apply_ptwrite_filter (extlang, btinfo);
+    }
+}
+
 /* Update values held by the extension language when OBJFILE is discarded.
    New global types must be created for every such value, which must then be
    updated to use the new types.
diff --git a/gdb/extension.h b/gdb/extension.h
index 72cff218f5b..edd6e69bf48 100644
--- a/gdb/extension.h
+++ b/gdb/extension.h
@@ -295,6 +295,9 @@ extern enum ext_lang_bt_status apply_ext_lang_frame_filter
    enum ext_lang_frame_args args_type,
    struct ui_out *out, int frame_low, int frame_high);
 
+extern void apply_ext_lang_ptwrite_filter
+  (struct btrace_thread_info *btinfo);
+
 extern void preserve_ext_lang_values (struct objfile *, htab_t copied_types);
 
 extern const struct extension_language_defn *get_breakpoint_cond_ext_lang
diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c
index e5565b627d9..0ddb1567d2d 100644
--- a/gdb/guile/guile.c
+++ b/gdb/guile/guile.c
@@ -124,6 +124,7 @@ static const struct extension_language_ops guile_extension_ops =
   gdbscm_apply_val_pretty_printer,
 
   NULL, /* gdbscm_apply_frame_filter, */
+  NULL, /* gdbscm_load_ptwrite_filter, */
 
   gdbscm_preserve_values,
 
diff --git a/gdb/python/lib/gdb/ptwrite.py b/gdb/python/lib/gdb/ptwrite.py
new file mode 100644
index 00000000000..0f5b0473023
--- /dev/null
+++ b/gdb/python/lib/gdb/ptwrite.py
@@ -0,0 +1,80 @@
+# Ptwrite utilities.
+# Copyright (C) 2022 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+"""Utilities for working with ptwrite filters."""
+
+from copy import deepcopy
+import gdb
+
+
+def default_filter(payload, ip):
+    """Default filter that is active upon starting GDB."""
+    return "{:x}".format(payload)
+
+
+# This dict contains the per thread copies of the filter function and the
+# global template filter, from which the copies are created.
+_ptwrite_filter = {"global": default_filter}
+
+
+def ptwrite_exit_handler(event):
+    """Exit handler to prune _ptwrite_filter on inferior exit."""
+    for key in list(_ptwrite_filter.keys()):
+        if key.startswith(f"{event.inferior.pid}."):
+            del _ptwrite_filter[key]
+
+
+gdb.events.exited.connect(ptwrite_exit_handler)
+
+
+def _clear_traces(thread_list):
+    """Helper function to clear the trace of all threads in THREAD_LIST."""
+    current_thread = gdb.selected_thread()
+    recording = gdb.current_recording()
+
+    if recording is not None:
+        for thread in thread_list:
+            thread.switch()
+            recording.clear()
+
+        current_thread.switch()
+
+
+def register_filter(filter_):
+    """Register the ptwrite filter function."""
+    if filter_ is not None and not callable(filter_):
+        raise TypeError("The filter must be callable or 'None'.")
+
+    # Clear the traces of all threads to force re-decoding with
+    # the new filter.
+    thread_list = gdb.selected_inferior().threads()
+    _clear_traces(thread_list)
+
+    _ptwrite_filter.clear()
+    _ptwrite_filter["global"] = filter_
+
+
+def get_filter():
+    """Returns the filters of the current thread."""
+    # The key is of this format to enable an per-inferior cleanup when an
+    # inferior exits.
+    key = f"{gdb.selected_inferior().pid}.{gdb.selected_thread().ptid[1]}"
+
+    # Create a new filter for new threads.
+    if key not in _ptwrite_filter.keys():
+        _ptwrite_filter[key] = deepcopy(_ptwrite_filter["global"])
+
+    return _ptwrite_filter[key]
diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c
index c09ba6271b5..6234124e3b1 100644
--- a/gdb/python/py-record-btrace.c
+++ b/gdb/python/py-record-btrace.c
@@ -763,6 +763,94 @@ recpy_bt_function_call_history (PyObject *self, void *closure)
   return btpy_list_new (tinfo, first, last, 1, &recpy_func_type);
 }
 
+/* Helper function that calls PTW_FILTER with PAYLOAD and IP as arguments.
+   Returns the string that will be printed.  */
+std::string
+recpy_call_filter (const uint64_t payload, const uint64_t ip,
+		   const void *ptw_filter)
+{
+  std::string result;
+
+  if ((PyObject *) ptw_filter == nullptr)
+    error (_("No valid ptwrite filter."));
+  if ((PyObject *) ptw_filter == Py_None)
+    return result;
+
+  gdbpy_enter enter_py;
+
+  gdbpy_ref<> py_payload (PyLong_FromUnsignedLongLong (payload));
+  gdbpy_ref<> py_ip (PyLong_FromUnsignedLongLong (ip));
+
+  if (ip == 0)
+    py_ip = gdbpy_ref<>::new_reference (Py_None);
+
+  gdbpy_ref<> py_result (PyObject_CallFunctionObjArgs ((PyObject *) ptw_filter,
+							py_payload.get (),
+							py_ip.get (),
+							nullptr));
+
+  if (PyErr_Occurred ())
+    {
+      gdbpy_print_stack ();
+      gdbpy_error (_("Couldn't call the ptwrite filter."));
+    }
+
+  /* Py_None is valid and results in no output.  */
+  if (py_result == Py_None)
+    return result;
+
+  result = gdbpy_obj_to_string (py_result.get ()).get ();
+
+  if (PyErr_Occurred ())
+    {
+      gdbpy_print_stack ();
+      gdbpy_error (_("The ptwrite filter didn't return a string."));
+    }
+
+  return result;
+}
+
+/* Helper function returning the current ptwrite filter.  */
+
+PyObject *
+get_ptwrite_filter ()
+{
+  gdbpy_ref<> module (PyImport_ImportModule ("gdb.ptwrite"));
+
+  if (PyErr_Occurred ())
+  {
+    gdbpy_print_stack ();
+    return nullptr;
+  }
+
+  /* We need to keep the reference count.  */
+  gdbpy_ref<> ptw_filter (PyObject_CallMethod (module.get (), "get_filter",
+					       nullptr));
+
+  if (PyErr_Occurred ())
+    {
+      gdbpy_print_stack ();
+      gdbpy_error (_("Couldn't get the ptwrite filter."));
+    }
+
+  return ptw_filter.get();
+}
+
+/* Used for registering the default ptwrite filter to the current thread.  A
+   pointer to this function is stored in the python extension interface.  */
+
+void
+gdbpy_load_ptwrite_filter (const struct extension_language_defn *extlang,
+			   struct btrace_thread_info *btinfo)
+{
+  gdb_assert (btinfo != nullptr);
+
+  gdbpy_enter enter_py;
+
+  btinfo->ptw_callback_fun = &recpy_call_filter;
+  btinfo->ptw_context= get_ptwrite_filter ();
+}
+
 /* Implementation of BtraceRecord.goto (self, BtraceInstruction) -> None.  */
 
 PyObject *
diff --git a/gdb/python/py-record-btrace.h b/gdb/python/py-record-btrace.h
index b25b121d255..96abb07eaef 100644
--- a/gdb/python/py-record-btrace.h
+++ b/gdb/python/py-record-btrace.h
@@ -91,4 +91,12 @@ extern PyObject *recpy_bt_func_prev (PyObject *self, void *closure);
 /* Implementation of RecordFunctionSegment.next [RecordFunctionSegment].  */
 extern PyObject *recpy_bt_func_next (PyObject *self, void *closure);
 
+/* Helper function returning the current ptwrite filter.  */
+extern PyObject *get_ptwrite_filter ();
+
+/* Helper function to call the ptwrite filter.  */
+extern std::string recpy_call_filter (const uint64_t payload,
+				      const uint64_t ip,
+				      const void *ptw_filter);
+
 #endif /* PYTHON_PY_RECORD_BTRACE_H */
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 06357cc8c0b..14fc9ecd24f 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -376,6 +376,9 @@ extern enum ext_lang_rc gdbpy_apply_val_pretty_printer
    struct ui_file *stream, int recurse,
    const struct value_print_options *options,
    const struct language_defn *language);
+extern void gdbpy_load_ptwrite_filter
+  (const struct extension_language_defn *extlang,
+   struct btrace_thread_info *btinfo);
 extern enum ext_lang_bt_status gdbpy_apply_frame_filter
   (const struct extension_language_defn *,
    frame_info_ptr frame, frame_filter_flags flags,
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 29f2010ee8e..1dfa3df7abd 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -151,6 +151,8 @@ static const struct extension_language_ops python_extension_ops =
 
   gdbpy_apply_frame_filter,
 
+  gdbpy_load_ptwrite_filter,
+
   gdbpy_preserve_values,
 
   gdbpy_breakpoint_has_cond,
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v7 09/10] btrace, python: Enable ptwrite filter registration.
  2022-10-21 11:59 ` [PATCH v7 09/10] btrace, python: Enable ptwrite filter registration Felix Willgerodt
@ 2022-10-21 11:59   ` Felix Willgerodt
  0 siblings, 0 replies; 32+ messages in thread
From: Felix Willgerodt @ 2022-10-21 11:59 UTC (permalink / raw)
  To: gdb-patches, markus.t.metzger; +Cc: Felix Willgerodt

With this patch a default ptwrite filter is registered upon start of GDB.
It prints the plain ptwrite payload as hex.  The default filter can be
overwritten by registering a custom filter in python or by registering
"None", for no output at all.  Registering a filter function creates per
thread copies to allow unique internal states per thread.
---
 gdb/btrace.c                   |  4 ++
 gdb/btrace.h                   |  8 ++++
 gdb/data-directory/Makefile.in |  1 +
 gdb/extension-priv.h           |  5 ++
 gdb/extension.c                | 13 +++++
 gdb/extension.h                |  3 ++
 gdb/guile/guile.c              |  1 +
 gdb/python/lib/gdb/ptwrite.py  | 80 +++++++++++++++++++++++++++++++
 gdb/python/py-record-btrace.c  | 88 ++++++++++++++++++++++++++++++++++
 gdb/python/py-record-btrace.h  |  8 ++++
 gdb/python/python-internal.h   |  3 ++
 gdb/python/python.c            |  2 +
 12 files changed, 216 insertions(+)
 create mode 100644 gdb/python/lib/gdb/ptwrite.py

diff --git a/gdb/btrace.c b/gdb/btrace.c
index 67555e6897d..e6ded61883b 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -34,6 +34,7 @@
 #include "gdbsupport/rsp-low.h"
 #include "gdbcmd.h"
 #include "cli/cli-utils.h"
+#include "extension.h"
 #include "gdbarch.h"
 
 /* For maintenance commands.  */
@@ -1317,6 +1318,9 @@ ftrace_add_pt (struct btrace_thread_info *btinfo,
   uint64_t offset;
   int status;
 
+  /* Register the ptwrite filter.  */
+  apply_ext_lang_ptwrite_filter (btinfo);
+
   for (;;)
     {
       struct pt_insn insn;
diff --git a/gdb/btrace.h b/gdb/btrace.h
index 36870d9b2ec..08acf3c5929 100644
--- a/gdb/btrace.h
+++ b/gdb/btrace.h
@@ -352,6 +352,14 @@ struct btrace_thread_info
      displaying or stepping through the execution history.  */
   std::vector<std::string> aux_data;
 
+  /* Function pointer to the ptwrite callback.  Returns the string returned
+     by the ptwrite filter function.  */
+  std::string (*ptw_callback_fun) (const uint64_t payload, const uint64_t ip,
+				   const void *ptw_context) = nullptr;
+
+  /* Context for the ptw_callback_fun.  */
+  void *ptw_context = nullptr;
+
   /* The function level offset.  When added to each function's LEVEL,
      this normalizes the function levels such that the smallest level
      becomes zero.  */
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
index cf5226f3961..506c16af4b5 100644
--- a/gdb/data-directory/Makefile.in
+++ b/gdb/data-directory/Makefile.in
@@ -75,6 +75,7 @@ PYTHON_FILE_LIST = \
 	gdb/frames.py \
 	gdb/printing.py \
 	gdb/prompt.py \
+	gdb/ptwrite.py \
 	gdb/styling.py \
 	gdb/types.py \
 	gdb/unwinder.py \
diff --git a/gdb/extension-priv.h b/gdb/extension-priv.h
index 50e9337af6e..972bd444191 100644
--- a/gdb/extension-priv.h
+++ b/gdb/extension-priv.h
@@ -183,6 +183,11 @@ struct extension_language_ops
      enum ext_lang_frame_args args_type,
      struct ui_out *out, int frame_low, int frame_high);
 
+  /* Used for registering the ptwrite filter to the current thread.  */
+  void (*apply_ptwrite_filter)
+    (const struct extension_language_defn *extlang,
+     struct btrace_thread_info *btinfo);
+
   /* Update values held by the extension language when OBJFILE is discarded.
      New global types must be created for every such value, which must then be
      updated to use the new types.
diff --git a/gdb/extension.c b/gdb/extension.c
index 8cbd80f45d5..ed45b378e4a 100644
--- a/gdb/extension.c
+++ b/gdb/extension.c
@@ -550,6 +550,19 @@ apply_ext_lang_frame_filter (frame_info_ptr frame,
   return EXT_LANG_BT_NO_FILTERS;
 }
 
+/* Used for registering the ptwrite filter to the current thread.  */
+
+void
+apply_ext_lang_ptwrite_filter (btrace_thread_info *btinfo)
+{
+  for (const struct extension_language_defn *extlang : extension_languages)
+    {
+      if (extlang->ops != nullptr
+	  && extlang->ops->apply_ptwrite_filter != nullptr)
+	extlang->ops->apply_ptwrite_filter (extlang, btinfo);
+    }
+}
+
 /* Update values held by the extension language when OBJFILE is discarded.
    New global types must be created for every such value, which must then be
    updated to use the new types.
diff --git a/gdb/extension.h b/gdb/extension.h
index 72cff218f5b..edd6e69bf48 100644
--- a/gdb/extension.h
+++ b/gdb/extension.h
@@ -295,6 +295,9 @@ extern enum ext_lang_bt_status apply_ext_lang_frame_filter
    enum ext_lang_frame_args args_type,
    struct ui_out *out, int frame_low, int frame_high);
 
+extern void apply_ext_lang_ptwrite_filter
+  (struct btrace_thread_info *btinfo);
+
 extern void preserve_ext_lang_values (struct objfile *, htab_t copied_types);
 
 extern const struct extension_language_defn *get_breakpoint_cond_ext_lang
diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c
index e5565b627d9..0ddb1567d2d 100644
--- a/gdb/guile/guile.c
+++ b/gdb/guile/guile.c
@@ -124,6 +124,7 @@ static const struct extension_language_ops guile_extension_ops =
   gdbscm_apply_val_pretty_printer,
 
   NULL, /* gdbscm_apply_frame_filter, */
+  NULL, /* gdbscm_load_ptwrite_filter, */
 
   gdbscm_preserve_values,
 
diff --git a/gdb/python/lib/gdb/ptwrite.py b/gdb/python/lib/gdb/ptwrite.py
new file mode 100644
index 00000000000..0f5b0473023
--- /dev/null
+++ b/gdb/python/lib/gdb/ptwrite.py
@@ -0,0 +1,80 @@
+# Ptwrite utilities.
+# Copyright (C) 2022 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+"""Utilities for working with ptwrite filters."""
+
+from copy import deepcopy
+import gdb
+
+
+def default_filter(payload, ip):
+    """Default filter that is active upon starting GDB."""
+    return "{:x}".format(payload)
+
+
+# This dict contains the per thread copies of the filter function and the
+# global template filter, from which the copies are created.
+_ptwrite_filter = {"global": default_filter}
+
+
+def ptwrite_exit_handler(event):
+    """Exit handler to prune _ptwrite_filter on inferior exit."""
+    for key in list(_ptwrite_filter.keys()):
+        if key.startswith(f"{event.inferior.pid}."):
+            del _ptwrite_filter[key]
+
+
+gdb.events.exited.connect(ptwrite_exit_handler)
+
+
+def _clear_traces(thread_list):
+    """Helper function to clear the trace of all threads in THREAD_LIST."""
+    current_thread = gdb.selected_thread()
+    recording = gdb.current_recording()
+
+    if recording is not None:
+        for thread in thread_list:
+            thread.switch()
+            recording.clear()
+
+        current_thread.switch()
+
+
+def register_filter(filter_):
+    """Register the ptwrite filter function."""
+    if filter_ is not None and not callable(filter_):
+        raise TypeError("The filter must be callable or 'None'.")
+
+    # Clear the traces of all threads to force re-decoding with
+    # the new filter.
+    thread_list = gdb.selected_inferior().threads()
+    _clear_traces(thread_list)
+
+    _ptwrite_filter.clear()
+    _ptwrite_filter["global"] = filter_
+
+
+def get_filter():
+    """Returns the filters of the current thread."""
+    # The key is of this format to enable an per-inferior cleanup when an
+    # inferior exits.
+    key = f"{gdb.selected_inferior().pid}.{gdb.selected_thread().ptid[1]}"
+
+    # Create a new filter for new threads.
+    if key not in _ptwrite_filter.keys():
+        _ptwrite_filter[key] = deepcopy(_ptwrite_filter["global"])
+
+    return _ptwrite_filter[key]
diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c
index c09ba6271b5..6234124e3b1 100644
--- a/gdb/python/py-record-btrace.c
+++ b/gdb/python/py-record-btrace.c
@@ -763,6 +763,94 @@ recpy_bt_function_call_history (PyObject *self, void *closure)
   return btpy_list_new (tinfo, first, last, 1, &recpy_func_type);
 }
 
+/* Helper function that calls PTW_FILTER with PAYLOAD and IP as arguments.
+   Returns the string that will be printed.  */
+std::string
+recpy_call_filter (const uint64_t payload, const uint64_t ip,
+		   const void *ptw_filter)
+{
+  std::string result;
+
+  if ((PyObject *) ptw_filter == nullptr)
+    error (_("No valid ptwrite filter."));
+  if ((PyObject *) ptw_filter == Py_None)
+    return result;
+
+  gdbpy_enter enter_py;
+
+  gdbpy_ref<> py_payload (PyLong_FromUnsignedLongLong (payload));
+  gdbpy_ref<> py_ip (PyLong_FromUnsignedLongLong (ip));
+
+  if (ip == 0)
+    py_ip = gdbpy_ref<>::new_reference (Py_None);
+
+  gdbpy_ref<> py_result (PyObject_CallFunctionObjArgs ((PyObject *) ptw_filter,
+							py_payload.get (),
+							py_ip.get (),
+							nullptr));
+
+  if (PyErr_Occurred ())
+    {
+      gdbpy_print_stack ();
+      gdbpy_error (_("Couldn't call the ptwrite filter."));
+    }
+
+  /* Py_None is valid and results in no output.  */
+  if (py_result == Py_None)
+    return result;
+
+  result = gdbpy_obj_to_string (py_result.get ()).get ();
+
+  if (PyErr_Occurred ())
+    {
+      gdbpy_print_stack ();
+      gdbpy_error (_("The ptwrite filter didn't return a string."));
+    }
+
+  return result;
+}
+
+/* Helper function returning the current ptwrite filter.  */
+
+PyObject *
+get_ptwrite_filter ()
+{
+  gdbpy_ref<> module (PyImport_ImportModule ("gdb.ptwrite"));
+
+  if (PyErr_Occurred ())
+  {
+    gdbpy_print_stack ();
+    return nullptr;
+  }
+
+  /* We need to keep the reference count.  */
+  gdbpy_ref<> ptw_filter (PyObject_CallMethod (module.get (), "get_filter",
+					       nullptr));
+
+  if (PyErr_Occurred ())
+    {
+      gdbpy_print_stack ();
+      gdbpy_error (_("Couldn't get the ptwrite filter."));
+    }
+
+  return ptw_filter.get();
+}
+
+/* Used for registering the default ptwrite filter to the current thread.  A
+   pointer to this function is stored in the python extension interface.  */
+
+void
+gdbpy_load_ptwrite_filter (const struct extension_language_defn *extlang,
+			   struct btrace_thread_info *btinfo)
+{
+  gdb_assert (btinfo != nullptr);
+
+  gdbpy_enter enter_py;
+
+  btinfo->ptw_callback_fun = &recpy_call_filter;
+  btinfo->ptw_context= get_ptwrite_filter ();
+}
+
 /* Implementation of BtraceRecord.goto (self, BtraceInstruction) -> None.  */
 
 PyObject *
diff --git a/gdb/python/py-record-btrace.h b/gdb/python/py-record-btrace.h
index b25b121d255..96abb07eaef 100644
--- a/gdb/python/py-record-btrace.h
+++ b/gdb/python/py-record-btrace.h
@@ -91,4 +91,12 @@ extern PyObject *recpy_bt_func_prev (PyObject *self, void *closure);
 /* Implementation of RecordFunctionSegment.next [RecordFunctionSegment].  */
 extern PyObject *recpy_bt_func_next (PyObject *self, void *closure);
 
+/* Helper function returning the current ptwrite filter.  */
+extern PyObject *get_ptwrite_filter ();
+
+/* Helper function to call the ptwrite filter.  */
+extern std::string recpy_call_filter (const uint64_t payload,
+				      const uint64_t ip,
+				      const void *ptw_filter);
+
 #endif /* PYTHON_PY_RECORD_BTRACE_H */
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 06357cc8c0b..14fc9ecd24f 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -376,6 +376,9 @@ extern enum ext_lang_rc gdbpy_apply_val_pretty_printer
    struct ui_file *stream, int recurse,
    const struct value_print_options *options,
    const struct language_defn *language);
+extern void gdbpy_load_ptwrite_filter
+  (const struct extension_language_defn *extlang,
+   struct btrace_thread_info *btinfo);
 extern enum ext_lang_bt_status gdbpy_apply_frame_filter
   (const struct extension_language_defn *,
    frame_info_ptr frame, frame_filter_flags flags,
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 29f2010ee8e..1dfa3df7abd 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -151,6 +151,8 @@ static const struct extension_language_ops python_extension_ops =
 
   gdbpy_apply_frame_filter,
 
+  gdbpy_load_ptwrite_filter,
+
   gdbpy_preserve_values,
 
   gdbpy_breakpoint_has_cond,
-- 
2.34.3

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v7 01/10] btrace: Introduce auxiliary instructions.
  2022-10-21 11:59 ` [PATCH v7 01/10] btrace: Introduce auxiliary instructions Felix Willgerodt
  2022-10-21 11:59   ` Felix Willgerodt
@ 2022-10-21 13:19   ` Eli Zaretskii
  1 sibling, 0 replies; 32+ messages in thread
From: Eli Zaretskii @ 2022-10-21 13:19 UTC (permalink / raw)
  To: Felix Willgerodt; +Cc: gdb-patches, markus.t.metzger

> Date: Fri, 21 Oct 2022 13:59:38 +0200
> From: Felix Willgerodt via Gdb-patches <gdb-patches@sourceware.org>
> 
> Auxiliary instructions are pseudo instructions pointing to auxiliary data.
> This auxiliary data can be printed in all commands displaying (record
> function-call-history, record instruction-history) or stepping through
> (stepi etc.) the execution history, which will be introduced in the next
> commits.
> 
> This patch is in preparation for the new ptwrite feature, which is based on
> auxiliary instructions.
> ---
>  gdb/btrace.c        |  2 ++
>  gdb/btrace.h        | 24 +++++++++++++++++++++---
>  gdb/doc/gdb.texinfo |  3 +++
>  3 files changed, 26 insertions(+), 3 deletions(-)

Thanks, the documentation part is OK.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
                   ` (9 preceding siblings ...)
  2022-10-21 11:59 ` [PATCH v7 09/10] btrace, python: Enable ptwrite filter registration Felix Willgerodt
@ 2022-11-09 13:16 ` Willgerodt, Felix
  10 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2022-11-09 13:16 UTC (permalink / raw)
  To: gdb-patches

*Ping*

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix <felix.willgerodt@intel.com>
> Sent: Freitag, 21. Oktober 2022 14:00
> To: gdb-patches@sourceware.org; Metzger, Markus T
> <markus.t.metzger@intel.com>
> Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> Subject: [PATCH v7 00/10] Extensions for PTWRITE
> 
> Eli already approved the documentation parts.
> Markus reviewed every patch and approved the btrace bits.
> The only thing that is missing is a global maintainers approval for
> the Python bits.
> 
> Compared to v6 I only addressed the nits that Eli and Markus pointed out.
> 
> The older revisions can be found here:
> V1: https://sourceware.org/pipermail/gdb-patches/2019-May/157933.html
> V2: https://sourceware.org/pipermail/gdb-patches/2021-June/179908.html
> V3: https://sourceware.org/pipermail/gdb-patches/2021-June/180035.html
> v4: https://sourceware.org/pipermail/gdb-patches/2022-May/188772.html
> v5: https://sourceware.org/pipermail/gdb-patches/2022-June/190236.html
> v6: https://sourceware.org/pipermail/gdb-patches/2022-
> September/191866.html
> 
> Thanks,
> Felix
> 
> Felix Willgerodt (10):
>   btrace: Introduce auxiliary instructions.
>   btrace: Enable auxiliary instructions in record instruction-history.
>   btrace: Enable auxiliary instructions in record function-call-history.
>   btrace: Handle stepping and goto for auxiliary instructions.
>   python: Introduce gdb.RecordAuxiliary class.
>   python: Add clear() to gdb.Record.
>   btrace, gdbserver: Add ptwrite to btrace_config_pt.
>   btrace, linux: Enable ptwrite packets.
>   btrace, python: Enable ptwrite filter registration.
>   btrace: Extend ptwrite event decoding.
> 
>  gdb/NEWS                                      |   7 +
>  gdb/btrace.c                                  |  68 ++-
>  gdb/btrace.h                                  |  38 +-
>  gdb/config.in                                 |   3 +
>  gdb/configure                                 |  11 +
>  gdb/data-directory/Makefile.in                |   1 +
>  gdb/disasm-flags.h                            |   1 +
>  gdb/doc/gdb.texinfo                           |  32 +-
>  gdb/doc/python.texi                           | 168 ++++++
>  gdb/extension-priv.h                          |   5 +
>  gdb/extension.c                               |  13 +
>  gdb/extension.h                               |   3 +
>  gdb/features/btrace-conf.dtd                  |   1 +
>  gdb/guile/guile.c                             |   1 +
>  gdb/nat/linux-btrace.c                        |  29 +
>  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
>  gdb/python/py-record-btrace.c                 | 136 ++++-
>  gdb/python/py-record-btrace.h                 |  11 +
>  gdb/python/py-record.c                        |  89 ++-
>  gdb/python/py-record.h                        |   3 +
>  gdb/python/python-internal.h                  |   3 +
>  gdb/python/python.c                           |   2 +
>  gdb/record-btrace.c                           | 107 +++-
>  gdb/record.c                                  |  10 +
>  gdb/record.h                                  |   5 +-
>  gdb/remote.c                                  |  30 +
>  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550 ++++++++++++++++++
>  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
>  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
>  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544 +++++++++++++++++
>  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
>  gdb/testsuite/lib/gdb.exp                     |  74 +++
>  gdbserver/linux-low.cc                        |   2 +
>  gdbserver/server.cc                           |  18 +
>  gdbsupport/btrace-common.h                    |   6 +
>  gdbsupport/common.m4                          |   2 +
>  gdbsupport/config.in                          |   3 +
>  gdbsupport/configure                          |  11 +
>  38 files changed, 2286 insertions(+), 35 deletions(-)
>  create mode 100644 gdb/python/lib/gdb/ptwrite.py
>  create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
>  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
>  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
>  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S
> 
> --
> 2.34.3

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2023-01-30 13:07 ` Willgerodt, Felix
  2023-02-07 12:22   ` Willgerodt, Felix
  2023-02-20 12:51   ` Willgerodt, Felix
@ 2023-03-06  9:02   ` Willgerodt, Felix
  2 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2023-03-06  9:02 UTC (permalink / raw)
  To: gdb-patches

*Ping* v12

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Montag, 20. Februar 2023 13:51
> To: gdb-patches@sourceware.org
> Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v11
> 
> If there is anything I can do to help this progress, please let me know.
> I have it rebased locally, the only changes were to the "require" logic
> in the testcases and standard rebasing changes in remote.c,
> so I didn't repost a rebased version. Though it might make sense
> by now.
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix
> > Sent: Dienstag, 7. Februar 2023 13:22
> > To: gdb-patches@sourceware.org
> > Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping* v10
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Gdb-patches <gdb-patches-
> > > bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of
> > > Willgerodt, Felix via Gdb-patches
> > > Sent: Montag, 30. Januar 2023 14:08
> > > To: gdb-patches@sourceware.org
> > > Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > *Ping* v9
> > >
> > > Thanks,
> > > Felix
> > >
> > > > -----Original Message-----
> > > > From: Willgerodt, Felix
> > > > Sent: Montag, 23. Januar 2023 11:48
> > > > To: gdb-patches@sourceware.org
> > > > Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > >
> > > > *Ping* v8
> > > >
> > > > For convenience: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > October/192946.html
> > > >
> > > > This is mostly approved, it just needs someone to look at the python
> parts.
> > > >
> > > > Thanks,
> > > > Felix
> > > >
> > > > > -----Original Message-----
> > > > > From: Willgerodt, Felix
> > > > > Sent: Montag, 16. Januar 2023 10:30
> > > > > To: gdb-patches@sourceware.org
> > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > >
> > > > > *Ping* v7
> > > > >
> > > > > Thanks,
> > > > > Felix
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Willgerodt, Felix
> > > > > > Sent: Montag, 9. Januar 2023 13:22
> > > > > > To: gdb-patches@sourceware.org
> > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > >
> > > > > > *Ping* v6
> > > > > >
> > > > > > Thanks,
> > > > > > Felix
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Willgerodt, Felix
> > > > > > > Sent: Mittwoch, 14. Dezember 2022 14:23
> > > > > > > To: gdb-patches@sourceware.org
> > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > >
> > > > > > > *Ping* v5
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Felix
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Willgerodt, Felix
> > > > > > > > Sent: Mittwoch, 7. Dezember 2022 09:45
> > > > > > > > To: gdb-patches@sourceware.org
> > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > >
> > > > > > > > *Ping* v4
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Felix
> > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Willgerodt, Felix
> > > > > > > > > Sent: Mittwoch, 30. November 2022 09:40
> > > > > > > > > To: Willgerodt, Felix <felix.willgerodt@intel.com>; gdb-
> > > > > > > > > patches@sourceware.org
> > > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > >
> > > > > > > > > *Ping* v3
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > > Felix
> > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Gdb-patches <gdb-patches-
> > > > > > > > > > bounces+felix.willgerodt=intel.com@sourceware.org> On
> > > Behalf
> > > > Of
> > > > > > > > > > Willgerodt, Felix via Gdb-patches
> > > > > > > > > > Sent: Donnerstag, 17. November 2022 10:19
> > > > > > > > > > To: gdb-patches@sourceware.org
> > > > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > > >
> > > > > > > > > > *Ping* v2
> > > > > > > > > >
> > > > > > > > > > Thanks,
> > > > > > > > > > Felix
> > > > > > > > > >
> > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > From: Willgerodt, Felix
> > > > > > > > > > > Sent: Mittwoch, 9. November 2022 14:16
> > > > > > > > > > > To: gdb-patches@sourceware.org
> > > > > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > > > >
> > > > > > > > > > > *Ping*
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > > Felix
> > > > > > > > > > >
> > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > > > > > Sent: Freitag, 21. Oktober 2022 14:00
> > > > > > > > > > > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > > > > > > > > > > <markus.t.metzger@intel.com>
> > > > > > > > > > > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > > > > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > > > > >
> > > > > > > > > > > > Eli already approved the documentation parts.
> > > > > > > > > > > > Markus reviewed every patch and approved the btrace
> bits.
> > > > > > > > > > > > The only thing that is missing is a global maintainers
> > approval
> > > > for
> > > > > > > > > > > > the Python bits.
> > > > > > > > > > > >
> > > > > > > > > > > > Compared to v6 I only addressed the nits that Eli and
> Markus
> > > > > > > pointed
> > > > > > > > > out.
> > > > > > > > > > > >
> > > > > > > > > > > > The older revisions can be found here:
> > > > > > > > > > > > V1: https://sourceware.org/pipermail/gdb-
> patches/2019-
> > > > > > > > > > May/157933.html
> > > > > > > > > > > > V2: https://sourceware.org/pipermail/gdb-
> patches/2021-
> > > > > > > > > > > June/179908.html
> > > > > > > > > > > > V3: https://sourceware.org/pipermail/gdb-
> patches/2021-
> > > > > > > > > > > June/180035.html
> > > > > > > > > > > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > > > May/188772.html
> > > > > > > > > > > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > > > June/190236.html
> > > > > > > > > > > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > > > > > September/191866.html
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks,
> > > > > > > > > > > > Felix
> > > > > > > > > > > >
> > > > > > > > > > > > Felix Willgerodt (10):
> > > > > > > > > > > >   btrace: Introduce auxiliary instructions.
> > > > > > > > > > > >   btrace: Enable auxiliary instructions in record
> instruction-
> > > > > history.
> > > > > > > > > > > >   btrace: Enable auxiliary instructions in record function-
> call-
> > > > > > history.
> > > > > > > > > > > >   btrace: Handle stepping and goto for auxiliary
> instructions.
> > > > > > > > > > > >   python: Introduce gdb.RecordAuxiliary class.
> > > > > > > > > > > >   python: Add clear() to gdb.Record.
> > > > > > > > > > > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > > > > > > > > > > >   btrace, linux: Enable ptwrite packets.
> > > > > > > > > > > >   btrace, python: Enable ptwrite filter registration.
> > > > > > > > > > > >   btrace: Extend ptwrite event decoding.
> > > > > > > > > > > >
> > > > > > > > > > > >  gdb/NEWS                                      |   7 +
> > > > > > > > > > > >  gdb/btrace.c                                  |  68 ++-
> > > > > > > > > > > >  gdb/btrace.h                                  |  38 +-
> > > > > > > > > > > >  gdb/config.in                                 |   3 +
> > > > > > > > > > > >  gdb/configure                                 |  11 +
> > > > > > > > > > > >  gdb/data-directory/Makefile.in                |   1 +
> > > > > > > > > > > >  gdb/disasm-flags.h                            |   1 +
> > > > > > > > > > > >  gdb/doc/gdb.texinfo                           |  32 +-
> > > > > > > > > > > >  gdb/doc/python.texi                           | 168 ++++++
> > > > > > > > > > > >  gdb/extension-priv.h                          |   5 +
> > > > > > > > > > > >  gdb/extension.c                               |  13 +
> > > > > > > > > > > >  gdb/extension.h                               |   3 +
> > > > > > > > > > > >  gdb/features/btrace-conf.dtd                  |   1 +
> > > > > > > > > > > >  gdb/guile/guile.c                             |   1 +
> > > > > > > > > > > >  gdb/nat/linux-btrace.c                        |  29 +
> > > > > > > > > > > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > > > > > > > > > > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > > > > > > > > > > >  gdb/python/py-record-btrace.h                 |  11 +
> > > > > > > > > > > >  gdb/python/py-record.c                        |  89 ++-
> > > > > > > > > > > >  gdb/python/py-record.h                        |   3 +
> > > > > > > > > > > >  gdb/python/python-internal.h                  |   3 +
> > > > > > > > > > > >  gdb/python/python.c                           |   2 +
> > > > > > > > > > > >  gdb/record-btrace.c                           | 107 +++-
> > > > > > > > > > > >  gdb/record.c                                  |  10 +
> > > > > > > > > > > >  gdb/record.h                                  |   5 +-
> > > > > > > > > > > >  gdb/remote.c                                  |  30 +
> > > > > > > > > > > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550
> > > > > > > > > ++++++++++++++++++
> > > > > > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > > > > > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209
> +++++++
> > > > > > > > > > > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> > > > > > > > > > +++++++++++++++++
> > > > > > > > > > > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > > > > > > > > > > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > > > > > > > > > > >  gdbserver/linux-low.cc                        |   2 +
> > > > > > > > > > > >  gdbserver/server.cc                           |  18 +
> > > > > > > > > > > >  gdbsupport/btrace-common.h                    |   6 +
> > > > > > > > > > > >  gdbsupport/common.m4                          |   2 +
> > > > > > > > > > > >  gdbsupport/config.in                          |   3 +
> > > > > > > > > > > >  gdbsupport/configure                          |  11 +
> > > > > > > > > > > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > > > > > > > > > > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > > > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-
> > > ptwrite.S
> > > > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > > > > > > > > > > >  create mode 100644
> gdb/testsuite/gdb.btrace/ptwrite.exp
> > > > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-
> > > > > ptwrite.S
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > 2.34.3
> > > > > > > > > >
> > > > > > > > > > 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
> > > 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

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2023-01-30 13:07 ` Willgerodt, Felix
  2023-02-07 12:22   ` Willgerodt, Felix
@ 2023-02-20 12:51   ` Willgerodt, Felix
  2023-03-06  9:02   ` Willgerodt, Felix
  2 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2023-02-20 12:51 UTC (permalink / raw)
  To: gdb-patches

*Ping* v11

If there is anything I can do to help this progress, please let me know.
I have it rebased locally, the only changes were to the "require" logic
in the testcases and standard rebasing changes in remote.c,
so I didn't repost a rebased version. Though it might make sense
by now.

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Dienstag, 7. Februar 2023 13:22
> To: gdb-patches@sourceware.org
> Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v10
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Gdb-patches <gdb-patches-
> > bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of
> > Willgerodt, Felix via Gdb-patches
> > Sent: Montag, 30. Januar 2023 14:08
> > To: gdb-patches@sourceware.org
> > Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping* v9
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Willgerodt, Felix
> > > Sent: Montag, 23. Januar 2023 11:48
> > > To: gdb-patches@sourceware.org
> > > Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > *Ping* v8
> > >
> > > For convenience: https://sourceware.org/pipermail/gdb-patches/2022-
> > > October/192946.html
> > >
> > > This is mostly approved, it just needs someone to look at the python parts.
> > >
> > > Thanks,
> > > Felix
> > >
> > > > -----Original Message-----
> > > > From: Willgerodt, Felix
> > > > Sent: Montag, 16. Januar 2023 10:30
> > > > To: gdb-patches@sourceware.org
> > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > >
> > > > *Ping* v7
> > > >
> > > > Thanks,
> > > > Felix
> > > >
> > > > > -----Original Message-----
> > > > > From: Willgerodt, Felix
> > > > > Sent: Montag, 9. Januar 2023 13:22
> > > > > To: gdb-patches@sourceware.org
> > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > >
> > > > > *Ping* v6
> > > > >
> > > > > Thanks,
> > > > > Felix
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Willgerodt, Felix
> > > > > > Sent: Mittwoch, 14. Dezember 2022 14:23
> > > > > > To: gdb-patches@sourceware.org
> > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > >
> > > > > > *Ping* v5
> > > > > >
> > > > > > Thanks,
> > > > > > Felix
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Willgerodt, Felix
> > > > > > > Sent: Mittwoch, 7. Dezember 2022 09:45
> > > > > > > To: gdb-patches@sourceware.org
> > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > >
> > > > > > > *Ping* v4
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Felix
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Willgerodt, Felix
> > > > > > > > Sent: Mittwoch, 30. November 2022 09:40
> > > > > > > > To: Willgerodt, Felix <felix.willgerodt@intel.com>; gdb-
> > > > > > > > patches@sourceware.org
> > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > >
> > > > > > > > *Ping* v3
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Felix
> > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Gdb-patches <gdb-patches-
> > > > > > > > > bounces+felix.willgerodt=intel.com@sourceware.org> On
> > Behalf
> > > Of
> > > > > > > > > Willgerodt, Felix via Gdb-patches
> > > > > > > > > Sent: Donnerstag, 17. November 2022 10:19
> > > > > > > > > To: gdb-patches@sourceware.org
> > > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > >
> > > > > > > > > *Ping* v2
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > > Felix
> > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Willgerodt, Felix
> > > > > > > > > > Sent: Mittwoch, 9. November 2022 14:16
> > > > > > > > > > To: gdb-patches@sourceware.org
> > > > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > > >
> > > > > > > > > > *Ping*
> > > > > > > > > >
> > > > > > > > > > Thanks,
> > > > > > > > > > Felix
> > > > > > > > > >
> > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > > > > Sent: Freitag, 21. Oktober 2022 14:00
> > > > > > > > > > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > > > > > > > > > <markus.t.metzger@intel.com>
> > > > > > > > > > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > > > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > > > >
> > > > > > > > > > > Eli already approved the documentation parts.
> > > > > > > > > > > Markus reviewed every patch and approved the btrace bits.
> > > > > > > > > > > The only thing that is missing is a global maintainers
> approval
> > > for
> > > > > > > > > > > the Python bits.
> > > > > > > > > > >
> > > > > > > > > > > Compared to v6 I only addressed the nits that Eli and Markus
> > > > > > pointed
> > > > > > > > out.
> > > > > > > > > > >
> > > > > > > > > > > The older revisions can be found here:
> > > > > > > > > > > V1: https://sourceware.org/pipermail/gdb-patches/2019-
> > > > > > > > > May/157933.html
> > > > > > > > > > > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > > > > > June/179908.html
> > > > > > > > > > > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > > > > > June/180035.html
> > > > > > > > > > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > > May/188772.html
> > > > > > > > > > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > > June/190236.html
> > > > > > > > > > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > > > > September/191866.html
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > > Felix
> > > > > > > > > > >
> > > > > > > > > > > Felix Willgerodt (10):
> > > > > > > > > > >   btrace: Introduce auxiliary instructions.
> > > > > > > > > > >   btrace: Enable auxiliary instructions in record instruction-
> > > > history.
> > > > > > > > > > >   btrace: Enable auxiliary instructions in record function-call-
> > > > > history.
> > > > > > > > > > >   btrace: Handle stepping and goto for auxiliary instructions.
> > > > > > > > > > >   python: Introduce gdb.RecordAuxiliary class.
> > > > > > > > > > >   python: Add clear() to gdb.Record.
> > > > > > > > > > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > > > > > > > > > >   btrace, linux: Enable ptwrite packets.
> > > > > > > > > > >   btrace, python: Enable ptwrite filter registration.
> > > > > > > > > > >   btrace: Extend ptwrite event decoding.
> > > > > > > > > > >
> > > > > > > > > > >  gdb/NEWS                                      |   7 +
> > > > > > > > > > >  gdb/btrace.c                                  |  68 ++-
> > > > > > > > > > >  gdb/btrace.h                                  |  38 +-
> > > > > > > > > > >  gdb/config.in                                 |   3 +
> > > > > > > > > > >  gdb/configure                                 |  11 +
> > > > > > > > > > >  gdb/data-directory/Makefile.in                |   1 +
> > > > > > > > > > >  gdb/disasm-flags.h                            |   1 +
> > > > > > > > > > >  gdb/doc/gdb.texinfo                           |  32 +-
> > > > > > > > > > >  gdb/doc/python.texi                           | 168 ++++++
> > > > > > > > > > >  gdb/extension-priv.h                          |   5 +
> > > > > > > > > > >  gdb/extension.c                               |  13 +
> > > > > > > > > > >  gdb/extension.h                               |   3 +
> > > > > > > > > > >  gdb/features/btrace-conf.dtd                  |   1 +
> > > > > > > > > > >  gdb/guile/guile.c                             |   1 +
> > > > > > > > > > >  gdb/nat/linux-btrace.c                        |  29 +
> > > > > > > > > > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > > > > > > > > > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > > > > > > > > > >  gdb/python/py-record-btrace.h                 |  11 +
> > > > > > > > > > >  gdb/python/py-record.c                        |  89 ++-
> > > > > > > > > > >  gdb/python/py-record.h                        |   3 +
> > > > > > > > > > >  gdb/python/python-internal.h                  |   3 +
> > > > > > > > > > >  gdb/python/python.c                           |   2 +
> > > > > > > > > > >  gdb/record-btrace.c                           | 107 +++-
> > > > > > > > > > >  gdb/record.c                                  |  10 +
> > > > > > > > > > >  gdb/record.h                                  |   5 +-
> > > > > > > > > > >  gdb/remote.c                                  |  30 +
> > > > > > > > > > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550
> > > > > > > > ++++++++++++++++++
> > > > > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > > > > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> > > > > > > > > > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> > > > > > > > > +++++++++++++++++
> > > > > > > > > > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > > > > > > > > > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > > > > > > > > > >  gdbserver/linux-low.cc                        |   2 +
> > > > > > > > > > >  gdbserver/server.cc                           |  18 +
> > > > > > > > > > >  gdbsupport/btrace-common.h                    |   6 +
> > > > > > > > > > >  gdbsupport/common.m4                          |   2 +
> > > > > > > > > > >  gdbsupport/config.in                          |   3 +
> > > > > > > > > > >  gdbsupport/configure                          |  11 +
> > > > > > > > > > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > > > > > > > > > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-
> > ptwrite.S
> > > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> > > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-
> > > > ptwrite.S
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > 2.34.3
> > > > > > > > >
> > > > > > > > > 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
> > 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

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2023-01-30 13:07 ` Willgerodt, Felix
@ 2023-02-07 12:22   ` Willgerodt, Felix
  2023-02-20 12:51   ` Willgerodt, Felix
  2023-03-06  9:02   ` Willgerodt, Felix
  2 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2023-02-07 12:22 UTC (permalink / raw)
  To: gdb-patches

*Ping* v10

Thanks,
Felix

> -----Original Message-----
> From: Gdb-patches <gdb-patches-
> bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of
> Willgerodt, Felix via Gdb-patches
> Sent: Montag, 30. Januar 2023 14:08
> To: gdb-patches@sourceware.org
> Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v9
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix
> > Sent: Montag, 23. Januar 2023 11:48
> > To: gdb-patches@sourceware.org
> > Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping* v8
> >
> > For convenience: https://sourceware.org/pipermail/gdb-patches/2022-
> > October/192946.html
> >
> > This is mostly approved, it just needs someone to look at the python parts.
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Willgerodt, Felix
> > > Sent: Montag, 16. Januar 2023 10:30
> > > To: gdb-patches@sourceware.org
> > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > *Ping* v7
> > >
> > > Thanks,
> > > Felix
> > >
> > > > -----Original Message-----
> > > > From: Willgerodt, Felix
> > > > Sent: Montag, 9. Januar 2023 13:22
> > > > To: gdb-patches@sourceware.org
> > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > >
> > > > *Ping* v6
> > > >
> > > > Thanks,
> > > > Felix
> > > >
> > > > > -----Original Message-----
> > > > > From: Willgerodt, Felix
> > > > > Sent: Mittwoch, 14. Dezember 2022 14:23
> > > > > To: gdb-patches@sourceware.org
> > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > >
> > > > > *Ping* v5
> > > > >
> > > > > Thanks,
> > > > > Felix
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Willgerodt, Felix
> > > > > > Sent: Mittwoch, 7. Dezember 2022 09:45
> > > > > > To: gdb-patches@sourceware.org
> > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > >
> > > > > > *Ping* v4
> > > > > >
> > > > > > Thanks,
> > > > > > Felix
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Willgerodt, Felix
> > > > > > > Sent: Mittwoch, 30. November 2022 09:40
> > > > > > > To: Willgerodt, Felix <felix.willgerodt@intel.com>; gdb-
> > > > > > > patches@sourceware.org
> > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > >
> > > > > > > *Ping* v3
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Felix
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Gdb-patches <gdb-patches-
> > > > > > > > bounces+felix.willgerodt=intel.com@sourceware.org> On
> Behalf
> > Of
> > > > > > > > Willgerodt, Felix via Gdb-patches
> > > > > > > > Sent: Donnerstag, 17. November 2022 10:19
> > > > > > > > To: gdb-patches@sourceware.org
> > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > >
> > > > > > > > *Ping* v2
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Felix
> > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Willgerodt, Felix
> > > > > > > > > Sent: Mittwoch, 9. November 2022 14:16
> > > > > > > > > To: gdb-patches@sourceware.org
> > > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > >
> > > > > > > > > *Ping*
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > > Felix
> > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > > > Sent: Freitag, 21. Oktober 2022 14:00
> > > > > > > > > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > > > > > > > > <markus.t.metzger@intel.com>
> > > > > > > > > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > > >
> > > > > > > > > > Eli already approved the documentation parts.
> > > > > > > > > > Markus reviewed every patch and approved the btrace bits.
> > > > > > > > > > The only thing that is missing is a global maintainers approval
> > for
> > > > > > > > > > the Python bits.
> > > > > > > > > >
> > > > > > > > > > Compared to v6 I only addressed the nits that Eli and Markus
> > > > > pointed
> > > > > > > out.
> > > > > > > > > >
> > > > > > > > > > The older revisions can be found here:
> > > > > > > > > > V1: https://sourceware.org/pipermail/gdb-patches/2019-
> > > > > > > > May/157933.html
> > > > > > > > > > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > > > > June/179908.html
> > > > > > > > > > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > > > > June/180035.html
> > > > > > > > > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > May/188772.html
> > > > > > > > > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > June/190236.html
> > > > > > > > > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > > > September/191866.html
> > > > > > > > > >
> > > > > > > > > > Thanks,
> > > > > > > > > > Felix
> > > > > > > > > >
> > > > > > > > > > Felix Willgerodt (10):
> > > > > > > > > >   btrace: Introduce auxiliary instructions.
> > > > > > > > > >   btrace: Enable auxiliary instructions in record instruction-
> > > history.
> > > > > > > > > >   btrace: Enable auxiliary instructions in record function-call-
> > > > history.
> > > > > > > > > >   btrace: Handle stepping and goto for auxiliary instructions.
> > > > > > > > > >   python: Introduce gdb.RecordAuxiliary class.
> > > > > > > > > >   python: Add clear() to gdb.Record.
> > > > > > > > > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > > > > > > > > >   btrace, linux: Enable ptwrite packets.
> > > > > > > > > >   btrace, python: Enable ptwrite filter registration.
> > > > > > > > > >   btrace: Extend ptwrite event decoding.
> > > > > > > > > >
> > > > > > > > > >  gdb/NEWS                                      |   7 +
> > > > > > > > > >  gdb/btrace.c                                  |  68 ++-
> > > > > > > > > >  gdb/btrace.h                                  |  38 +-
> > > > > > > > > >  gdb/config.in                                 |   3 +
> > > > > > > > > >  gdb/configure                                 |  11 +
> > > > > > > > > >  gdb/data-directory/Makefile.in                |   1 +
> > > > > > > > > >  gdb/disasm-flags.h                            |   1 +
> > > > > > > > > >  gdb/doc/gdb.texinfo                           |  32 +-
> > > > > > > > > >  gdb/doc/python.texi                           | 168 ++++++
> > > > > > > > > >  gdb/extension-priv.h                          |   5 +
> > > > > > > > > >  gdb/extension.c                               |  13 +
> > > > > > > > > >  gdb/extension.h                               |   3 +
> > > > > > > > > >  gdb/features/btrace-conf.dtd                  |   1 +
> > > > > > > > > >  gdb/guile/guile.c                             |   1 +
> > > > > > > > > >  gdb/nat/linux-btrace.c                        |  29 +
> > > > > > > > > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > > > > > > > > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > > > > > > > > >  gdb/python/py-record-btrace.h                 |  11 +
> > > > > > > > > >  gdb/python/py-record.c                        |  89 ++-
> > > > > > > > > >  gdb/python/py-record.h                        |   3 +
> > > > > > > > > >  gdb/python/python-internal.h                  |   3 +
> > > > > > > > > >  gdb/python/python.c                           |   2 +
> > > > > > > > > >  gdb/record-btrace.c                           | 107 +++-
> > > > > > > > > >  gdb/record.c                                  |  10 +
> > > > > > > > > >  gdb/record.h                                  |   5 +-
> > > > > > > > > >  gdb/remote.c                                  |  30 +
> > > > > > > > > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550
> > > > > > > ++++++++++++++++++
> > > > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > > > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> > > > > > > > > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> > > > > > > > +++++++++++++++++
> > > > > > > > > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > > > > > > > > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > > > > > > > > >  gdbserver/linux-low.cc                        |   2 +
> > > > > > > > > >  gdbserver/server.cc                           |  18 +
> > > > > > > > > >  gdbsupport/btrace-common.h                    |   6 +
> > > > > > > > > >  gdbsupport/common.m4                          |   2 +
> > > > > > > > > >  gdbsupport/config.in                          |   3 +
> > > > > > > > > >  gdbsupport/configure                          |  11 +
> > > > > > > > > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > > > > > > > > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-
> ptwrite.S
> > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> > > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-
> > > ptwrite.S
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > 2.34.3
> > > > > > > >
> > > > > > > > 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
> 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

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2022-11-17  9:18 Willgerodt, Felix
                   ` (5 preceding siblings ...)
  2023-01-23 10:47 ` Willgerodt, Felix
@ 2023-01-30 13:07 ` Willgerodt, Felix
  2023-02-07 12:22   ` Willgerodt, Felix
                     ` (2 more replies)
  6 siblings, 3 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2023-01-30 13:07 UTC (permalink / raw)
  To: gdb-patches

*Ping* v9

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Montag, 23. Januar 2023 11:48
> To: gdb-patches@sourceware.org
> Subject: RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v8
> 
> For convenience: https://sourceware.org/pipermail/gdb-patches/2022-
> October/192946.html
> 
> This is mostly approved, it just needs someone to look at the python parts.
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix
> > Sent: Montag, 16. Januar 2023 10:30
> > To: gdb-patches@sourceware.org
> > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping* v7
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Willgerodt, Felix
> > > Sent: Montag, 9. Januar 2023 13:22
> > > To: gdb-patches@sourceware.org
> > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > *Ping* v6
> > >
> > > Thanks,
> > > Felix
> > >
> > > > -----Original Message-----
> > > > From: Willgerodt, Felix
> > > > Sent: Mittwoch, 14. Dezember 2022 14:23
> > > > To: gdb-patches@sourceware.org
> > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > >
> > > > *Ping* v5
> > > >
> > > > Thanks,
> > > > Felix
> > > >
> > > > > -----Original Message-----
> > > > > From: Willgerodt, Felix
> > > > > Sent: Mittwoch, 7. Dezember 2022 09:45
> > > > > To: gdb-patches@sourceware.org
> > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > >
> > > > > *Ping* v4
> > > > >
> > > > > Thanks,
> > > > > Felix
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Willgerodt, Felix
> > > > > > Sent: Mittwoch, 30. November 2022 09:40
> > > > > > To: Willgerodt, Felix <felix.willgerodt@intel.com>; gdb-
> > > > > > patches@sourceware.org
> > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > >
> > > > > > *Ping* v3
> > > > > >
> > > > > > Thanks,
> > > > > > Felix
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Gdb-patches <gdb-patches-
> > > > > > > bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf
> Of
> > > > > > > Willgerodt, Felix via Gdb-patches
> > > > > > > Sent: Donnerstag, 17. November 2022 10:19
> > > > > > > To: gdb-patches@sourceware.org
> > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > >
> > > > > > > *Ping* v2
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Felix
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Willgerodt, Felix
> > > > > > > > Sent: Mittwoch, 9. November 2022 14:16
> > > > > > > > To: gdb-patches@sourceware.org
> > > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > >
> > > > > > > > *Ping*
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Felix
> > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > > Sent: Freitag, 21. Oktober 2022 14:00
> > > > > > > > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > > > > > > > <markus.t.metzger@intel.com>
> > > > > > > > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > > >
> > > > > > > > > Eli already approved the documentation parts.
> > > > > > > > > Markus reviewed every patch and approved the btrace bits.
> > > > > > > > > The only thing that is missing is a global maintainers approval
> for
> > > > > > > > > the Python bits.
> > > > > > > > >
> > > > > > > > > Compared to v6 I only addressed the nits that Eli and Markus
> > > > pointed
> > > > > > out.
> > > > > > > > >
> > > > > > > > > The older revisions can be found here:
> > > > > > > > > V1: https://sourceware.org/pipermail/gdb-patches/2019-
> > > > > > > May/157933.html
> > > > > > > > > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > > > June/179908.html
> > > > > > > > > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > > > June/180035.html
> > > > > > > > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > May/188772.html
> > > > > > > > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > June/190236.html
> > > > > > > > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > > September/191866.html
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > > Felix
> > > > > > > > >
> > > > > > > > > Felix Willgerodt (10):
> > > > > > > > >   btrace: Introduce auxiliary instructions.
> > > > > > > > >   btrace: Enable auxiliary instructions in record instruction-
> > history.
> > > > > > > > >   btrace: Enable auxiliary instructions in record function-call-
> > > history.
> > > > > > > > >   btrace: Handle stepping and goto for auxiliary instructions.
> > > > > > > > >   python: Introduce gdb.RecordAuxiliary class.
> > > > > > > > >   python: Add clear() to gdb.Record.
> > > > > > > > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > > > > > > > >   btrace, linux: Enable ptwrite packets.
> > > > > > > > >   btrace, python: Enable ptwrite filter registration.
> > > > > > > > >   btrace: Extend ptwrite event decoding.
> > > > > > > > >
> > > > > > > > >  gdb/NEWS                                      |   7 +
> > > > > > > > >  gdb/btrace.c                                  |  68 ++-
> > > > > > > > >  gdb/btrace.h                                  |  38 +-
> > > > > > > > >  gdb/config.in                                 |   3 +
> > > > > > > > >  gdb/configure                                 |  11 +
> > > > > > > > >  gdb/data-directory/Makefile.in                |   1 +
> > > > > > > > >  gdb/disasm-flags.h                            |   1 +
> > > > > > > > >  gdb/doc/gdb.texinfo                           |  32 +-
> > > > > > > > >  gdb/doc/python.texi                           | 168 ++++++
> > > > > > > > >  gdb/extension-priv.h                          |   5 +
> > > > > > > > >  gdb/extension.c                               |  13 +
> > > > > > > > >  gdb/extension.h                               |   3 +
> > > > > > > > >  gdb/features/btrace-conf.dtd                  |   1 +
> > > > > > > > >  gdb/guile/guile.c                             |   1 +
> > > > > > > > >  gdb/nat/linux-btrace.c                        |  29 +
> > > > > > > > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > > > > > > > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > > > > > > > >  gdb/python/py-record-btrace.h                 |  11 +
> > > > > > > > >  gdb/python/py-record.c                        |  89 ++-
> > > > > > > > >  gdb/python/py-record.h                        |   3 +
> > > > > > > > >  gdb/python/python-internal.h                  |   3 +
> > > > > > > > >  gdb/python/python.c                           |   2 +
> > > > > > > > >  gdb/record-btrace.c                           | 107 +++-
> > > > > > > > >  gdb/record.c                                  |  10 +
> > > > > > > > >  gdb/record.h                                  |   5 +-
> > > > > > > > >  gdb/remote.c                                  |  30 +
> > > > > > > > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550
> > > > > > ++++++++++++++++++
> > > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> > > > > > > > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> > > > > > > +++++++++++++++++
> > > > > > > > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > > > > > > > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > > > > > > > >  gdbserver/linux-low.cc                        |   2 +
> > > > > > > > >  gdbserver/server.cc                           |  18 +
> > > > > > > > >  gdbsupport/btrace-common.h                    |   6 +
> > > > > > > > >  gdbsupport/common.m4                          |   2 +
> > > > > > > > >  gdbsupport/config.in                          |   3 +
> > > > > > > > >  gdbsupport/configure                          |  11 +
> > > > > > > > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > > > > > > > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
> > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> > > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-
> > ptwrite.S
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > 2.34.3
> > > > > > >
> > > > > > > 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
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


^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2022-11-17  9:18 Willgerodt, Felix
                   ` (4 preceding siblings ...)
  2023-01-16  9:30 ` Willgerodt, Felix
@ 2023-01-23 10:47 ` Willgerodt, Felix
  2023-01-30 13:07 ` Willgerodt, Felix
  6 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2023-01-23 10:47 UTC (permalink / raw)
  To: gdb-patches

*Ping* v8

For convenience: https://sourceware.org/pipermail/gdb-patches/2022-October/192946.html

This is mostly approved, it just needs someone to look at the python parts.

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Montag, 16. Januar 2023 10:30
> To: gdb-patches@sourceware.org
> Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v7
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix
> > Sent: Montag, 9. Januar 2023 13:22
> > To: gdb-patches@sourceware.org
> > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping* v6
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Willgerodt, Felix
> > > Sent: Mittwoch, 14. Dezember 2022 14:23
> > > To: gdb-patches@sourceware.org
> > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > *Ping* v5
> > >
> > > Thanks,
> > > Felix
> > >
> > > > -----Original Message-----
> > > > From: Willgerodt, Felix
> > > > Sent: Mittwoch, 7. Dezember 2022 09:45
> > > > To: gdb-patches@sourceware.org
> > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > >
> > > > *Ping* v4
> > > >
> > > > Thanks,
> > > > Felix
> > > >
> > > > > -----Original Message-----
> > > > > From: Willgerodt, Felix
> > > > > Sent: Mittwoch, 30. November 2022 09:40
> > > > > To: Willgerodt, Felix <felix.willgerodt@intel.com>; gdb-
> > > > > patches@sourceware.org
> > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > >
> > > > > *Ping* v3
> > > > >
> > > > > Thanks,
> > > > > Felix
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Gdb-patches <gdb-patches-
> > > > > > bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of
> > > > > > Willgerodt, Felix via Gdb-patches
> > > > > > Sent: Donnerstag, 17. November 2022 10:19
> > > > > > To: gdb-patches@sourceware.org
> > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > >
> > > > > > *Ping* v2
> > > > > >
> > > > > > Thanks,
> > > > > > Felix
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Willgerodt, Felix
> > > > > > > Sent: Mittwoch, 9. November 2022 14:16
> > > > > > > To: gdb-patches@sourceware.org
> > > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > >
> > > > > > > *Ping*
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Felix
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > Sent: Freitag, 21. Oktober 2022 14:00
> > > > > > > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > > > > > > <markus.t.metzger@intel.com>
> > > > > > > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > > >
> > > > > > > > Eli already approved the documentation parts.
> > > > > > > > Markus reviewed every patch and approved the btrace bits.
> > > > > > > > The only thing that is missing is a global maintainers approval for
> > > > > > > > the Python bits.
> > > > > > > >
> > > > > > > > Compared to v6 I only addressed the nits that Eli and Markus
> > > pointed
> > > > > out.
> > > > > > > >
> > > > > > > > The older revisions can be found here:
> > > > > > > > V1: https://sourceware.org/pipermail/gdb-patches/2019-
> > > > > > May/157933.html
> > > > > > > > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > > June/179908.html
> > > > > > > > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > > June/180035.html
> > > > > > > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > May/188772.html
> > > > > > > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > June/190236.html
> > > > > > > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > > September/191866.html
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Felix
> > > > > > > >
> > > > > > > > Felix Willgerodt (10):
> > > > > > > >   btrace: Introduce auxiliary instructions.
> > > > > > > >   btrace: Enable auxiliary instructions in record instruction-
> history.
> > > > > > > >   btrace: Enable auxiliary instructions in record function-call-
> > history.
> > > > > > > >   btrace: Handle stepping and goto for auxiliary instructions.
> > > > > > > >   python: Introduce gdb.RecordAuxiliary class.
> > > > > > > >   python: Add clear() to gdb.Record.
> > > > > > > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > > > > > > >   btrace, linux: Enable ptwrite packets.
> > > > > > > >   btrace, python: Enable ptwrite filter registration.
> > > > > > > >   btrace: Extend ptwrite event decoding.
> > > > > > > >
> > > > > > > >  gdb/NEWS                                      |   7 +
> > > > > > > >  gdb/btrace.c                                  |  68 ++-
> > > > > > > >  gdb/btrace.h                                  |  38 +-
> > > > > > > >  gdb/config.in                                 |   3 +
> > > > > > > >  gdb/configure                                 |  11 +
> > > > > > > >  gdb/data-directory/Makefile.in                |   1 +
> > > > > > > >  gdb/disasm-flags.h                            |   1 +
> > > > > > > >  gdb/doc/gdb.texinfo                           |  32 +-
> > > > > > > >  gdb/doc/python.texi                           | 168 ++++++
> > > > > > > >  gdb/extension-priv.h                          |   5 +
> > > > > > > >  gdb/extension.c                               |  13 +
> > > > > > > >  gdb/extension.h                               |   3 +
> > > > > > > >  gdb/features/btrace-conf.dtd                  |   1 +
> > > > > > > >  gdb/guile/guile.c                             |   1 +
> > > > > > > >  gdb/nat/linux-btrace.c                        |  29 +
> > > > > > > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > > > > > > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > > > > > > >  gdb/python/py-record-btrace.h                 |  11 +
> > > > > > > >  gdb/python/py-record.c                        |  89 ++-
> > > > > > > >  gdb/python/py-record.h                        |   3 +
> > > > > > > >  gdb/python/python-internal.h                  |   3 +
> > > > > > > >  gdb/python/python.c                           |   2 +
> > > > > > > >  gdb/record-btrace.c                           | 107 +++-
> > > > > > > >  gdb/record.c                                  |  10 +
> > > > > > > >  gdb/record.h                                  |   5 +-
> > > > > > > >  gdb/remote.c                                  |  30 +
> > > > > > > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550
> > > > > ++++++++++++++++++
> > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> > > > > > > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> > > > > > +++++++++++++++++
> > > > > > > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > > > > > > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > > > > > > >  gdbserver/linux-low.cc                        |   2 +
> > > > > > > >  gdbserver/server.cc                           |  18 +
> > > > > > > >  gdbsupport/btrace-common.h                    |   6 +
> > > > > > > >  gdbsupport/common.m4                          |   2 +
> > > > > > > >  gdbsupport/config.in                          |   3 +
> > > > > > > >  gdbsupport/configure                          |  11 +
> > > > > > > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > > > > > > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
> > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> > > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-
> ptwrite.S
> > > > > > > >
> > > > > > > > --
> > > > > > > > 2.34.3
> > > > > >
> > > > > > 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
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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2022-11-17  9:18 Willgerodt, Felix
                   ` (3 preceding siblings ...)
  2023-01-09 12:21 ` Willgerodt, Felix
@ 2023-01-16  9:30 ` Willgerodt, Felix
  2023-01-23 10:47 ` Willgerodt, Felix
  2023-01-30 13:07 ` Willgerodt, Felix
  6 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2023-01-16  9:30 UTC (permalink / raw)
  To: gdb-patches

*Ping* v7

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Montag, 9. Januar 2023 13:22
> To: gdb-patches@sourceware.org
> Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v6
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix
> > Sent: Mittwoch, 14. Dezember 2022 14:23
> > To: gdb-patches@sourceware.org
> > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping* v5
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Willgerodt, Felix
> > > Sent: Mittwoch, 7. Dezember 2022 09:45
> > > To: gdb-patches@sourceware.org
> > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > *Ping* v4
> > >
> > > Thanks,
> > > Felix
> > >
> > > > -----Original Message-----
> > > > From: Willgerodt, Felix
> > > > Sent: Mittwoch, 30. November 2022 09:40
> > > > To: Willgerodt, Felix <felix.willgerodt@intel.com>; gdb-
> > > > patches@sourceware.org
> > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > >
> > > > *Ping* v3
> > > >
> > > > Thanks,
> > > > Felix
> > > >
> > > > > -----Original Message-----
> > > > > From: Gdb-patches <gdb-patches-
> > > > > bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of
> > > > > Willgerodt, Felix via Gdb-patches
> > > > > Sent: Donnerstag, 17. November 2022 10:19
> > > > > To: gdb-patches@sourceware.org
> > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > >
> > > > > *Ping* v2
> > > > >
> > > > > Thanks,
> > > > > Felix
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Willgerodt, Felix
> > > > > > Sent: Mittwoch, 9. November 2022 14:16
> > > > > > To: gdb-patches@sourceware.org
> > > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > > >
> > > > > > *Ping*
> > > > > >
> > > > > > Thanks,
> > > > > > Felix
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > Sent: Freitag, 21. Oktober 2022 14:00
> > > > > > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > > > > > <markus.t.metzger@intel.com>
> > > > > > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > > > > > >
> > > > > > > Eli already approved the documentation parts.
> > > > > > > Markus reviewed every patch and approved the btrace bits.
> > > > > > > The only thing that is missing is a global maintainers approval for
> > > > > > > the Python bits.
> > > > > > >
> > > > > > > Compared to v6 I only addressed the nits that Eli and Markus
> > pointed
> > > > out.
> > > > > > >
> > > > > > > The older revisions can be found here:
> > > > > > > V1: https://sourceware.org/pipermail/gdb-patches/2019-
> > > > > May/157933.html
> > > > > > > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > June/179908.html
> > > > > > > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > > June/180035.html
> > > > > > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > May/188772.html
> > > > > > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > June/190236.html
> > > > > > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > > September/191866.html
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Felix
> > > > > > >
> > > > > > > Felix Willgerodt (10):
> > > > > > >   btrace: Introduce auxiliary instructions.
> > > > > > >   btrace: Enable auxiliary instructions in record instruction-history.
> > > > > > >   btrace: Enable auxiliary instructions in record function-call-
> history.
> > > > > > >   btrace: Handle stepping and goto for auxiliary instructions.
> > > > > > >   python: Introduce gdb.RecordAuxiliary class.
> > > > > > >   python: Add clear() to gdb.Record.
> > > > > > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > > > > > >   btrace, linux: Enable ptwrite packets.
> > > > > > >   btrace, python: Enable ptwrite filter registration.
> > > > > > >   btrace: Extend ptwrite event decoding.
> > > > > > >
> > > > > > >  gdb/NEWS                                      |   7 +
> > > > > > >  gdb/btrace.c                                  |  68 ++-
> > > > > > >  gdb/btrace.h                                  |  38 +-
> > > > > > >  gdb/config.in                                 |   3 +
> > > > > > >  gdb/configure                                 |  11 +
> > > > > > >  gdb/data-directory/Makefile.in                |   1 +
> > > > > > >  gdb/disasm-flags.h                            |   1 +
> > > > > > >  gdb/doc/gdb.texinfo                           |  32 +-
> > > > > > >  gdb/doc/python.texi                           | 168 ++++++
> > > > > > >  gdb/extension-priv.h                          |   5 +
> > > > > > >  gdb/extension.c                               |  13 +
> > > > > > >  gdb/extension.h                               |   3 +
> > > > > > >  gdb/features/btrace-conf.dtd                  |   1 +
> > > > > > >  gdb/guile/guile.c                             |   1 +
> > > > > > >  gdb/nat/linux-btrace.c                        |  29 +
> > > > > > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > > > > > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > > > > > >  gdb/python/py-record-btrace.h                 |  11 +
> > > > > > >  gdb/python/py-record.c                        |  89 ++-
> > > > > > >  gdb/python/py-record.h                        |   3 +
> > > > > > >  gdb/python/python-internal.h                  |   3 +
> > > > > > >  gdb/python/python.c                           |   2 +
> > > > > > >  gdb/record-btrace.c                           | 107 +++-
> > > > > > >  gdb/record.c                                  |  10 +
> > > > > > >  gdb/record.h                                  |   5 +-
> > > > > > >  gdb/remote.c                                  |  30 +
> > > > > > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550
> > > > ++++++++++++++++++
> > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > > > > > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> > > > > > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> > > > > +++++++++++++++++
> > > > > > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > > > > > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > > > > > >  gdbserver/linux-low.cc                        |   2 +
> > > > > > >  gdbserver/server.cc                           |  18 +
> > > > > > >  gdbsupport/btrace-common.h                    |   6 +
> > > > > > >  gdbsupport/common.m4                          |   2 +
> > > > > > >  gdbsupport/config.in                          |   3 +
> > > > > > >  gdbsupport/configure                          |  11 +
> > > > > > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > > > > > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
> > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> > > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S
> > > > > > >
> > > > > > > --
> > > > > > > 2.34.3
> > > > >
> > > > > 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
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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2022-11-17  9:18 Willgerodt, Felix
                   ` (2 preceding siblings ...)
  2022-12-14 13:23 ` Willgerodt, Felix
@ 2023-01-09 12:21 ` Willgerodt, Felix
  2023-01-16  9:30 ` Willgerodt, Felix
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2023-01-09 12:21 UTC (permalink / raw)
  To: gdb-patches

*Ping* v6

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Mittwoch, 14. Dezember 2022 14:23
> To: gdb-patches@sourceware.org
> Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v5
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix
> > Sent: Mittwoch, 7. Dezember 2022 09:45
> > To: gdb-patches@sourceware.org
> > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping* v4
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Willgerodt, Felix
> > > Sent: Mittwoch, 30. November 2022 09:40
> > > To: Willgerodt, Felix <felix.willgerodt@intel.com>; gdb-
> > > patches@sourceware.org
> > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > *Ping* v3
> > >
> > > Thanks,
> > > Felix
> > >
> > > > -----Original Message-----
> > > > From: Gdb-patches <gdb-patches-
> > > > bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of
> > > > Willgerodt, Felix via Gdb-patches
> > > > Sent: Donnerstag, 17. November 2022 10:19
> > > > To: gdb-patches@sourceware.org
> > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > >
> > > > *Ping* v2
> > > >
> > > > Thanks,
> > > > Felix
> > > >
> > > > > -----Original Message-----
> > > > > From: Willgerodt, Felix
> > > > > Sent: Mittwoch, 9. November 2022 14:16
> > > > > To: gdb-patches@sourceware.org
> > > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > > >
> > > > > *Ping*
> > > > >
> > > > > Thanks,
> > > > > Felix
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > Sent: Freitag, 21. Oktober 2022 14:00
> > > > > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > > > > <markus.t.metzger@intel.com>
> > > > > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > > > > >
> > > > > > Eli already approved the documentation parts.
> > > > > > Markus reviewed every patch and approved the btrace bits.
> > > > > > The only thing that is missing is a global maintainers approval for
> > > > > > the Python bits.
> > > > > >
> > > > > > Compared to v6 I only addressed the nits that Eli and Markus
> pointed
> > > out.
> > > > > >
> > > > > > The older revisions can be found here:
> > > > > > V1: https://sourceware.org/pipermail/gdb-patches/2019-
> > > > May/157933.html
> > > > > > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > June/179908.html
> > > > > > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > > June/180035.html
> > > > > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > May/188772.html
> > > > > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > June/190236.html
> > > > > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > > September/191866.html
> > > > > >
> > > > > > Thanks,
> > > > > > Felix
> > > > > >
> > > > > > Felix Willgerodt (10):
> > > > > >   btrace: Introduce auxiliary instructions.
> > > > > >   btrace: Enable auxiliary instructions in record instruction-history.
> > > > > >   btrace: Enable auxiliary instructions in record function-call-history.
> > > > > >   btrace: Handle stepping and goto for auxiliary instructions.
> > > > > >   python: Introduce gdb.RecordAuxiliary class.
> > > > > >   python: Add clear() to gdb.Record.
> > > > > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > > > > >   btrace, linux: Enable ptwrite packets.
> > > > > >   btrace, python: Enable ptwrite filter registration.
> > > > > >   btrace: Extend ptwrite event decoding.
> > > > > >
> > > > > >  gdb/NEWS                                      |   7 +
> > > > > >  gdb/btrace.c                                  |  68 ++-
> > > > > >  gdb/btrace.h                                  |  38 +-
> > > > > >  gdb/config.in                                 |   3 +
> > > > > >  gdb/configure                                 |  11 +
> > > > > >  gdb/data-directory/Makefile.in                |   1 +
> > > > > >  gdb/disasm-flags.h                            |   1 +
> > > > > >  gdb/doc/gdb.texinfo                           |  32 +-
> > > > > >  gdb/doc/python.texi                           | 168 ++++++
> > > > > >  gdb/extension-priv.h                          |   5 +
> > > > > >  gdb/extension.c                               |  13 +
> > > > > >  gdb/extension.h                               |   3 +
> > > > > >  gdb/features/btrace-conf.dtd                  |   1 +
> > > > > >  gdb/guile/guile.c                             |   1 +
> > > > > >  gdb/nat/linux-btrace.c                        |  29 +
> > > > > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > > > > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > > > > >  gdb/python/py-record-btrace.h                 |  11 +
> > > > > >  gdb/python/py-record.c                        |  89 ++-
> > > > > >  gdb/python/py-record.h                        |   3 +
> > > > > >  gdb/python/python-internal.h                  |   3 +
> > > > > >  gdb/python/python.c                           |   2 +
> > > > > >  gdb/record-btrace.c                           | 107 +++-
> > > > > >  gdb/record.c                                  |  10 +
> > > > > >  gdb/record.h                                  |   5 +-
> > > > > >  gdb/remote.c                                  |  30 +
> > > > > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550
> > > ++++++++++++++++++
> > > > > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > > > > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> > > > > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> > > > +++++++++++++++++
> > > > > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > > > > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > > > > >  gdbserver/linux-low.cc                        |   2 +
> > > > > >  gdbserver/server.cc                           |  18 +
> > > > > >  gdbsupport/btrace-common.h                    |   6 +
> > > > > >  gdbsupport/common.m4                          |   2 +
> > > > > >  gdbsupport/config.in                          |   3 +
> > > > > >  gdbsupport/configure                          |  11 +
> > > > > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > > > > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
> > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> > > > > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S
> > > > > >
> > > > > > --
> > > > > > 2.34.3
> > > >
> > > > 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
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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2022-11-17  9:18 Willgerodt, Felix
  2022-11-30  8:40 ` Willgerodt, Felix
  2022-12-07  8:45 ` Willgerodt, Felix
@ 2022-12-14 13:23 ` Willgerodt, Felix
  2023-01-09 12:21 ` Willgerodt, Felix
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2022-12-14 13:23 UTC (permalink / raw)
  To: gdb-patches

*Ping* v5

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Mittwoch, 7. Dezember 2022 09:45
> To: gdb-patches@sourceware.org
> Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v4
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix
> > Sent: Mittwoch, 30. November 2022 09:40
> > To: Willgerodt, Felix <felix.willgerodt@intel.com>; gdb-
> > patches@sourceware.org
> > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping* v3
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Gdb-patches <gdb-patches-
> > > bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of
> > > Willgerodt, Felix via Gdb-patches
> > > Sent: Donnerstag, 17. November 2022 10:19
> > > To: gdb-patches@sourceware.org
> > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > *Ping* v2
> > >
> > > Thanks,
> > > Felix
> > >
> > > > -----Original Message-----
> > > > From: Willgerodt, Felix
> > > > Sent: Mittwoch, 9. November 2022 14:16
> > > > To: gdb-patches@sourceware.org
> > > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > > >
> > > > *Ping*
> > > >
> > > > Thanks,
> > > > Felix
> > > >
> > > > > -----Original Message-----
> > > > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > Sent: Freitag, 21. Oktober 2022 14:00
> > > > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > > > <markus.t.metzger@intel.com>
> > > > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > > > >
> > > > > Eli already approved the documentation parts.
> > > > > Markus reviewed every patch and approved the btrace bits.
> > > > > The only thing that is missing is a global maintainers approval for
> > > > > the Python bits.
> > > > >
> > > > > Compared to v6 I only addressed the nits that Eli and Markus pointed
> > out.
> > > > >
> > > > > The older revisions can be found here:
> > > > > V1: https://sourceware.org/pipermail/gdb-patches/2019-
> > > May/157933.html
> > > > > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > June/179908.html
> > > > > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> > > > June/180035.html
> > > > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> > > May/188772.html
> > > > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> > > June/190236.html
> > > > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > > September/191866.html
> > > > >
> > > > > Thanks,
> > > > > Felix
> > > > >
> > > > > Felix Willgerodt (10):
> > > > >   btrace: Introduce auxiliary instructions.
> > > > >   btrace: Enable auxiliary instructions in record instruction-history.
> > > > >   btrace: Enable auxiliary instructions in record function-call-history.
> > > > >   btrace: Handle stepping and goto for auxiliary instructions.
> > > > >   python: Introduce gdb.RecordAuxiliary class.
> > > > >   python: Add clear() to gdb.Record.
> > > > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > > > >   btrace, linux: Enable ptwrite packets.
> > > > >   btrace, python: Enable ptwrite filter registration.
> > > > >   btrace: Extend ptwrite event decoding.
> > > > >
> > > > >  gdb/NEWS                                      |   7 +
> > > > >  gdb/btrace.c                                  |  68 ++-
> > > > >  gdb/btrace.h                                  |  38 +-
> > > > >  gdb/config.in                                 |   3 +
> > > > >  gdb/configure                                 |  11 +
> > > > >  gdb/data-directory/Makefile.in                |   1 +
> > > > >  gdb/disasm-flags.h                            |   1 +
> > > > >  gdb/doc/gdb.texinfo                           |  32 +-
> > > > >  gdb/doc/python.texi                           | 168 ++++++
> > > > >  gdb/extension-priv.h                          |   5 +
> > > > >  gdb/extension.c                               |  13 +
> > > > >  gdb/extension.h                               |   3 +
> > > > >  gdb/features/btrace-conf.dtd                  |   1 +
> > > > >  gdb/guile/guile.c                             |   1 +
> > > > >  gdb/nat/linux-btrace.c                        |  29 +
> > > > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > > > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > > > >  gdb/python/py-record-btrace.h                 |  11 +
> > > > >  gdb/python/py-record.c                        |  89 ++-
> > > > >  gdb/python/py-record.h                        |   3 +
> > > > >  gdb/python/python-internal.h                  |   3 +
> > > > >  gdb/python/python.c                           |   2 +
> > > > >  gdb/record-btrace.c                           | 107 +++-
> > > > >  gdb/record.c                                  |  10 +
> > > > >  gdb/record.h                                  |   5 +-
> > > > >  gdb/remote.c                                  |  30 +
> > > > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550
> > ++++++++++++++++++
> > > > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > > > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> > > > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> > > +++++++++++++++++
> > > > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > > > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > > > >  gdbserver/linux-low.cc                        |   2 +
> > > > >  gdbserver/server.cc                           |  18 +
> > > > >  gdbsupport/btrace-common.h                    |   6 +
> > > > >  gdbsupport/common.m4                          |   2 +
> > > > >  gdbsupport/config.in                          |   3 +
> > > > >  gdbsupport/configure                          |  11 +
> > > > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > > > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > > > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
> > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> > > > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S
> > > > >
> > > > > --
> > > > > 2.34.3
> > >
> > > 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
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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2022-11-17  9:18 Willgerodt, Felix
  2022-11-30  8:40 ` Willgerodt, Felix
@ 2022-12-07  8:45 ` Willgerodt, Felix
  2022-12-14 13:23 ` Willgerodt, Felix
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2022-12-07  8:45 UTC (permalink / raw)
  To: gdb-patches

*Ping* v4

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Mittwoch, 30. November 2022 09:40
> To: Willgerodt, Felix <felix.willgerodt@intel.com>; gdb-
> patches@sourceware.org
> Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v3
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Gdb-patches <gdb-patches-
> > bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of
> > Willgerodt, Felix via Gdb-patches
> > Sent: Donnerstag, 17. November 2022 10:19
> > To: gdb-patches@sourceware.org
> > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping* v2
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Willgerodt, Felix
> > > Sent: Mittwoch, 9. November 2022 14:16
> > > To: gdb-patches@sourceware.org
> > > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > *Ping*
> > >
> > > Thanks,
> > > Felix
> > >
> > > > -----Original Message-----
> > > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > Sent: Freitag, 21. Oktober 2022 14:00
> > > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > > <markus.t.metzger@intel.com>
> > > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > > >
> > > > Eli already approved the documentation parts.
> > > > Markus reviewed every patch and approved the btrace bits.
> > > > The only thing that is missing is a global maintainers approval for
> > > > the Python bits.
> > > >
> > > > Compared to v6 I only addressed the nits that Eli and Markus pointed
> out.
> > > >
> > > > The older revisions can be found here:
> > > > V1: https://sourceware.org/pipermail/gdb-patches/2019-
> > May/157933.html
> > > > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> > > June/179908.html
> > > > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> > > June/180035.html
> > > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> > May/188772.html
> > > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> > June/190236.html
> > > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > > September/191866.html
> > > >
> > > > Thanks,
> > > > Felix
> > > >
> > > > Felix Willgerodt (10):
> > > >   btrace: Introduce auxiliary instructions.
> > > >   btrace: Enable auxiliary instructions in record instruction-history.
> > > >   btrace: Enable auxiliary instructions in record function-call-history.
> > > >   btrace: Handle stepping and goto for auxiliary instructions.
> > > >   python: Introduce gdb.RecordAuxiliary class.
> > > >   python: Add clear() to gdb.Record.
> > > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > > >   btrace, linux: Enable ptwrite packets.
> > > >   btrace, python: Enable ptwrite filter registration.
> > > >   btrace: Extend ptwrite event decoding.
> > > >
> > > >  gdb/NEWS                                      |   7 +
> > > >  gdb/btrace.c                                  |  68 ++-
> > > >  gdb/btrace.h                                  |  38 +-
> > > >  gdb/config.in                                 |   3 +
> > > >  gdb/configure                                 |  11 +
> > > >  gdb/data-directory/Makefile.in                |   1 +
> > > >  gdb/disasm-flags.h                            |   1 +
> > > >  gdb/doc/gdb.texinfo                           |  32 +-
> > > >  gdb/doc/python.texi                           | 168 ++++++
> > > >  gdb/extension-priv.h                          |   5 +
> > > >  gdb/extension.c                               |  13 +
> > > >  gdb/extension.h                               |   3 +
> > > >  gdb/features/btrace-conf.dtd                  |   1 +
> > > >  gdb/guile/guile.c                             |   1 +
> > > >  gdb/nat/linux-btrace.c                        |  29 +
> > > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > > >  gdb/python/py-record-btrace.h                 |  11 +
> > > >  gdb/python/py-record.c                        |  89 ++-
> > > >  gdb/python/py-record.h                        |   3 +
> > > >  gdb/python/python-internal.h                  |   3 +
> > > >  gdb/python/python.c                           |   2 +
> > > >  gdb/record-btrace.c                           | 107 +++-
> > > >  gdb/record.c                                  |  10 +
> > > >  gdb/record.h                                  |   5 +-
> > > >  gdb/remote.c                                  |  30 +
> > > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550
> ++++++++++++++++++
> > > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> > > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> > +++++++++++++++++
> > > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > > >  gdbserver/linux-low.cc                        |   2 +
> > > >  gdbserver/server.cc                           |  18 +
> > > >  gdbsupport/btrace-common.h                    |   6 +
> > > >  gdbsupport/common.m4                          |   2 +
> > > >  gdbsupport/config.in                          |   3 +
> > > >  gdbsupport/configure                          |  11 +
> > > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
> > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> > > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S
> > > >
> > > > --
> > > > 2.34.3
> >
> > 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
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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PING] [PATCH v7 00/10] Extensions for PTWRITE
  2022-11-17  9:18 Willgerodt, Felix
@ 2022-11-30  8:40 ` Willgerodt, Felix
  2022-12-07  8:45 ` Willgerodt, Felix
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2022-11-30  8:40 UTC (permalink / raw)
  To: Willgerodt, Felix, gdb-patches

*Ping* v3

Thanks,
Felix

> -----Original Message-----
> From: Gdb-patches <gdb-patches-
> bounces+felix.willgerodt=intel.com@sourceware.org> On Behalf Of
> Willgerodt, Felix via Gdb-patches
> Sent: Donnerstag, 17. November 2022 10:19
> To: gdb-patches@sourceware.org
> Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping* v2
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix
> > Sent: Mittwoch, 9. November 2022 14:16
> > To: gdb-patches@sourceware.org
> > Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> >
> > *Ping*
> >
> > Thanks,
> > Felix
> >
> > > -----Original Message-----
> > > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > Sent: Freitag, 21. Oktober 2022 14:00
> > > To: gdb-patches@sourceware.org; Metzger, Markus T
> > > <markus.t.metzger@intel.com>
> > > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> > >
> > > Eli already approved the documentation parts.
> > > Markus reviewed every patch and approved the btrace bits.
> > > The only thing that is missing is a global maintainers approval for
> > > the Python bits.
> > >
> > > Compared to v6 I only addressed the nits that Eli and Markus pointed out.
> > >
> > > The older revisions can be found here:
> > > V1: https://sourceware.org/pipermail/gdb-patches/2019-
> May/157933.html
> > > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> > June/179908.html
> > > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> > June/180035.html
> > > v4: https://sourceware.org/pipermail/gdb-patches/2022-
> May/188772.html
> > > v5: https://sourceware.org/pipermail/gdb-patches/2022-
> June/190236.html
> > > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > > September/191866.html
> > >
> > > Thanks,
> > > Felix
> > >
> > > Felix Willgerodt (10):
> > >   btrace: Introduce auxiliary instructions.
> > >   btrace: Enable auxiliary instructions in record instruction-history.
> > >   btrace: Enable auxiliary instructions in record function-call-history.
> > >   btrace: Handle stepping and goto for auxiliary instructions.
> > >   python: Introduce gdb.RecordAuxiliary class.
> > >   python: Add clear() to gdb.Record.
> > >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> > >   btrace, linux: Enable ptwrite packets.
> > >   btrace, python: Enable ptwrite filter registration.
> > >   btrace: Extend ptwrite event decoding.
> > >
> > >  gdb/NEWS                                      |   7 +
> > >  gdb/btrace.c                                  |  68 ++-
> > >  gdb/btrace.h                                  |  38 +-
> > >  gdb/config.in                                 |   3 +
> > >  gdb/configure                                 |  11 +
> > >  gdb/data-directory/Makefile.in                |   1 +
> > >  gdb/disasm-flags.h                            |   1 +
> > >  gdb/doc/gdb.texinfo                           |  32 +-
> > >  gdb/doc/python.texi                           | 168 ++++++
> > >  gdb/extension-priv.h                          |   5 +
> > >  gdb/extension.c                               |  13 +
> > >  gdb/extension.h                               |   3 +
> > >  gdb/features/btrace-conf.dtd                  |   1 +
> > >  gdb/guile/guile.c                             |   1 +
> > >  gdb/nat/linux-btrace.c                        |  29 +
> > >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> > >  gdb/python/py-record-btrace.c                 | 136 ++++-
> > >  gdb/python/py-record-btrace.h                 |  11 +
> > >  gdb/python/py-record.c                        |  89 ++-
> > >  gdb/python/py-record.h                        |   3 +
> > >  gdb/python/python-internal.h                  |   3 +
> > >  gdb/python/python.c                           |   2 +
> > >  gdb/record-btrace.c                           | 107 +++-
> > >  gdb/record.c                                  |  10 +
> > >  gdb/record.h                                  |   5 +-
> > >  gdb/remote.c                                  |  30 +
> > >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550 ++++++++++++++++++
> > >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> > >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> > >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544
> +++++++++++++++++
> > >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> > >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> > >  gdbserver/linux-low.cc                        |   2 +
> > >  gdbserver/server.cc                           |  18 +
> > >  gdbsupport/btrace-common.h                    |   6 +
> > >  gdbsupport/common.m4                          |   2 +
> > >  gdbsupport/config.in                          |   3 +
> > >  gdbsupport/configure                          |  11 +
> > >  38 files changed, 2286 insertions(+), 35 deletions(-)
> > >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> > >  create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
> > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> > >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> > >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S
> > >
> > > --
> > > 2.34.3
> 
> 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
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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PING] [PATCH v7 00/10] Extensions for PTWRITE
@ 2022-11-17  9:18 Willgerodt, Felix
  2022-11-30  8:40 ` Willgerodt, Felix
                   ` (6 more replies)
  0 siblings, 7 replies; 32+ messages in thread
From: Willgerodt, Felix @ 2022-11-17  9:18 UTC (permalink / raw)
  To: gdb-patches

*Ping* v2

Thanks,
Felix

> -----Original Message-----
> From: Willgerodt, Felix
> Sent: Mittwoch, 9. November 2022 14:16
> To: gdb-patches@sourceware.org
> Subject: [PING] [PATCH v7 00/10] Extensions for PTWRITE
> 
> *Ping*
> 
> Thanks,
> Felix
> 
> > -----Original Message-----
> > From: Willgerodt, Felix <felix.willgerodt@intel.com>
> > Sent: Freitag, 21. Oktober 2022 14:00
> > To: gdb-patches@sourceware.org; Metzger, Markus T
> > <markus.t.metzger@intel.com>
> > Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> > Subject: [PATCH v7 00/10] Extensions for PTWRITE
> >
> > Eli already approved the documentation parts.
> > Markus reviewed every patch and approved the btrace bits.
> > The only thing that is missing is a global maintainers approval for
> > the Python bits.
> >
> > Compared to v6 I only addressed the nits that Eli and Markus pointed out.
> >
> > The older revisions can be found here:
> > V1: https://sourceware.org/pipermail/gdb-patches/2019-May/157933.html
> > V2: https://sourceware.org/pipermail/gdb-patches/2021-
> June/179908.html
> > V3: https://sourceware.org/pipermail/gdb-patches/2021-
> June/180035.html
> > v4: https://sourceware.org/pipermail/gdb-patches/2022-May/188772.html
> > v5: https://sourceware.org/pipermail/gdb-patches/2022-June/190236.html
> > v6: https://sourceware.org/pipermail/gdb-patches/2022-
> > September/191866.html
> >
> > Thanks,
> > Felix
> >
> > Felix Willgerodt (10):
> >   btrace: Introduce auxiliary instructions.
> >   btrace: Enable auxiliary instructions in record instruction-history.
> >   btrace: Enable auxiliary instructions in record function-call-history.
> >   btrace: Handle stepping and goto for auxiliary instructions.
> >   python: Introduce gdb.RecordAuxiliary class.
> >   python: Add clear() to gdb.Record.
> >   btrace, gdbserver: Add ptwrite to btrace_config_pt.
> >   btrace, linux: Enable ptwrite packets.
> >   btrace, python: Enable ptwrite filter registration.
> >   btrace: Extend ptwrite event decoding.
> >
> >  gdb/NEWS                                      |   7 +
> >  gdb/btrace.c                                  |  68 ++-
> >  gdb/btrace.h                                  |  38 +-
> >  gdb/config.in                                 |   3 +
> >  gdb/configure                                 |  11 +
> >  gdb/data-directory/Makefile.in                |   1 +
> >  gdb/disasm-flags.h                            |   1 +
> >  gdb/doc/gdb.texinfo                           |  32 +-
> >  gdb/doc/python.texi                           | 168 ++++++
> >  gdb/extension-priv.h                          |   5 +
> >  gdb/extension.c                               |  13 +
> >  gdb/extension.h                               |   3 +
> >  gdb/features/btrace-conf.dtd                  |   1 +
> >  gdb/guile/guile.c                             |   1 +
> >  gdb/nat/linux-btrace.c                        |  29 +
> >  gdb/python/lib/gdb/ptwrite.py                 |  80 +++
> >  gdb/python/py-record-btrace.c                 | 136 ++++-
> >  gdb/python/py-record-btrace.h                 |  11 +
> >  gdb/python/py-record.c                        |  89 ++-
> >  gdb/python/py-record.h                        |   3 +
> >  gdb/python/python-internal.h                  |   3 +
> >  gdb/python/python.c                           |   2 +
> >  gdb/record-btrace.c                           | 107 +++-
> >  gdb/record.c                                  |  10 +
> >  gdb/record.h                                  |   5 +-
> >  gdb/remote.c                                  |  30 +
> >  gdb/testsuite/gdb.btrace/i386-ptwrite.S       | 550 ++++++++++++++++++
> >  gdb/testsuite/gdb.btrace/ptwrite.c            |  39 ++
> >  gdb/testsuite/gdb.btrace/ptwrite.exp          | 209 +++++++
> >  gdb/testsuite/gdb.btrace/x86_64-ptwrite.S     | 544 +++++++++++++++++
> >  gdb/testsuite/gdb.python/py-record-btrace.exp |   6 +-
> >  gdb/testsuite/lib/gdb.exp                     |  74 +++
> >  gdbserver/linux-low.cc                        |   2 +
> >  gdbserver/server.cc                           |  18 +
> >  gdbsupport/btrace-common.h                    |   6 +
> >  gdbsupport/common.m4                          |   2 +
> >  gdbsupport/config.in                          |   3 +
> >  gdbsupport/configure                          |  11 +
> >  38 files changed, 2286 insertions(+), 35 deletions(-)
> >  create mode 100644 gdb/python/lib/gdb/ptwrite.py
> >  create mode 100644 gdb/testsuite/gdb.btrace/i386-ptwrite.S
> >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.c
> >  create mode 100644 gdb/testsuite/gdb.btrace/ptwrite.exp
> >  create mode 100644 gdb/testsuite/gdb.btrace/x86_64-ptwrite.S
> >
> > --
> > 2.34.3

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2023-03-06  9:02 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 11:59 [PATCH v7 00/10] Extensions for PTWRITE Felix Willgerodt
2022-10-21 11:59 ` Felix Willgerodt
2022-10-21 11:59 ` [PATCH v7 01/10] btrace: Introduce auxiliary instructions Felix Willgerodt
2022-10-21 11:59   ` Felix Willgerodt
2022-10-21 13:19   ` Eli Zaretskii
2022-10-21 11:59 ` [PATCH v7 02/10] btrace: Enable auxiliary instructions in record instruction-history Felix Willgerodt
2022-10-21 11:59 ` [PATCH v7 03/10] btrace: Enable auxiliary instructions in record function-call-history Felix Willgerodt
2022-10-21 11:59   ` Felix Willgerodt
2022-10-21 11:59 ` [PATCH v7 04/10] btrace: Handle stepping and goto for auxiliary instructions Felix Willgerodt
2022-10-21 11:59   ` Felix Willgerodt
2022-10-21 11:59 ` [PATCH v7 05/10] python: Introduce gdb.RecordAuxiliary class Felix Willgerodt
2022-10-21 11:59   ` Felix Willgerodt
2022-10-21 11:59 ` [PATCH v7 06/10] python: Add clear() to gdb.Record Felix Willgerodt
2022-10-21 11:59   ` Felix Willgerodt
2022-10-21 11:59 ` [PATCH v7 07/10] btrace, gdbserver: Add ptwrite to btrace_config_pt Felix Willgerodt
2022-10-21 11:59   ` Felix Willgerodt
2022-10-21 11:59 ` [PATCH v7 08/10] btrace, linux: Enable ptwrite packets Felix Willgerodt
2022-10-21 11:59   ` Felix Willgerodt
2022-10-21 11:59 ` [PATCH v7 09/10] btrace, python: Enable ptwrite filter registration Felix Willgerodt
2022-10-21 11:59   ` Felix Willgerodt
2022-11-09 13:16 ` [PING] [PATCH v7 00/10] Extensions for PTWRITE Willgerodt, Felix
2022-11-17  9:18 Willgerodt, Felix
2022-11-30  8:40 ` Willgerodt, Felix
2022-12-07  8:45 ` Willgerodt, Felix
2022-12-14 13:23 ` Willgerodt, Felix
2023-01-09 12:21 ` Willgerodt, Felix
2023-01-16  9:30 ` Willgerodt, Felix
2023-01-23 10:47 ` Willgerodt, Felix
2023-01-30 13:07 ` Willgerodt, Felix
2023-02-07 12:22   ` Willgerodt, Felix
2023-02-20 12:51   ` Willgerodt, Felix
2023-03-06  9:02   ` Willgerodt, Felix

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).