[PATCH 0/7] btrace: Intel PT event tracing support
Felix Willgerodt
felix.willgerodt@intel.com
Mon Sep 2 11:49:42 GMT 2024
Newer Intel CPUs add support for recording certain asynchronous events - like
interrupts or vmentry/vmexit - with Intel PT. This series adds support
for recording and showing such events in GDB. The feature is guarded by the
setting "set record btrace pt event-tracing". It is based on the same
auxiliary instructions infrastructure as the recently added PTWRITE support.
Therefore events will be displayed during "record instruction-history",
"record function-call-history", when stepping through a recording, and in
python.
Felix Willgerodt (7):
btrace: Print "non-contiguous" for gaps.
btrace: Add printing support for cfe and evd packets.
btrace: Enable event tracing on Linux for Intel PT.
btrace: Add support for interrupt events.
btrace: Add support for IRET events.
btrace: Add support for further events.
btrace: Add support for UINTR and UIRET events.
gdb/btrace.c | 274 +++++++++++++++++-
gdb/btrace.h | 8 +-
gdb/doc/gdb.texinfo | 41 ++-
gdb/features/btrace-conf.dtd | 1 +
gdb/nat/linux-btrace.c | 11 +
gdb/record-btrace.c | 44 +++
gdb/remote.c | 50 +++-
gdb/testsuite/gdb.btrace/event-tracing-gap.c | 34 +++
.../gdb.btrace/event-tracing-gap.exp | 77 +++++
gdb/testsuite/gdb.btrace/event-tracing.exp | 57 ++++
gdb/testsuite/gdb.btrace/null-deref.c | 34 +++
gdb/testsuite/gdb.btrace/uli.c | 132 +++++++++
gdb/testsuite/gdb.btrace/uli_events.exp | 51 ++++
gdb/testsuite/lib/gdb.exp | 55 ++++
gdbserver/linux-low.cc | 2 +
gdbserver/server.cc | 14 +
gdbsupport/btrace-common.h | 3 +
17 files changed, 874 insertions(+), 14 deletions(-)
create mode 100644 gdb/testsuite/gdb.btrace/event-tracing-gap.c
create mode 100644 gdb/testsuite/gdb.btrace/event-tracing-gap.exp
create mode 100644 gdb/testsuite/gdb.btrace/event-tracing.exp
create mode 100644 gdb/testsuite/gdb.btrace/null-deref.c
create mode 100644 gdb/testsuite/gdb.btrace/uli.c
create mode 100644 gdb/testsuite/gdb.btrace/uli_events.exp
--
2.34.1
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list