From: Markus Metzger <markus.t.metzger@intel.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/5] gdb, gdbserver, btrace: enhanced resync on decode error
Date: Fri, 30 Oct 2026 14:57:39 +0100 [thread overview]
Message-ID: <20261030135744.921562-1-markus.t.metzger@intel.com> (raw)
This adds an advanced feature to 'record btrace pt'.
In the (hopefully rare) event of a trace decode error, the decoder skips
forward to the next decode synchronization packet that provides the full
state for initializing a decoder. This may skip a fair amount of trace.
On processors that do not use deferred TIP packets, the decoder may also
synchronize on the next IP-providing packet. This should skip much less
trace, but adds the risk of further decode errors.
In particular, the decoder will not be able to maintain its call stack
that it uses to decode compressed returns, which are represented by a
single Taken bit instead of a TIP packet that provides the return address.
This series therefore adds an option to disable return compression. This
is not a good idea in general as it increases the trace size.
By default, enhanced synchronization is off and return compression is on,
which is the current behavior without this series.
Markus Metzger (5):
gdb, btrace: refactor handle_pt_insn_events()
gdb, btrace: refactor ftrace_add_pt()
gdb, btrace: fix btrace remote configuration
gdb, gdbserver, btrace: allow disabling return compression
gdb, gdbserver, btrace: resync on error
gdb/NEWS | 21 +
gdb/btrace.c | 716 ++++++++++++++++++++---------------
gdb/doc/gdb.texinfo | 58 +++
gdb/features/btrace-conf.dtd | 1 +
gdb/features/btrace.dtd | 1 +
gdb/nat/linux-btrace.c | 5 +
gdb/record-btrace.c | 93 ++++-
gdb/record-btrace.h | 5 +
gdb/remote.c | 115 +++++-
gdbserver/linux-low.cc | 5 +-
gdbserver/server.cc | 15 +
gdbsupport/btrace-common.h | 9 +
12 files changed, 709 insertions(+), 335 deletions(-)
--
2.53.0
________________________________________
Intel Deutschland GmbH
Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 (89) 99143-0
www.intel.de
Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman
Chairperson of the Supervisory Board: Sonja Pierer
Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
next reply other threads:[~2026-10-30 13:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 13:57 Markus Metzger [this message]
2026-10-30 13:57 ` [PATCH 1/5] gdb, btrace: refactor handle_pt_insn_events() Markus Metzger
2026-10-30 13:57 ` [PATCH 2/5] gdb, btrace: refactor ftrace_add_pt() Markus Metzger
2026-10-30 13:57 ` [PATCH 3/5] gdb, btrace: fix btrace remote configuration Markus Metzger
2026-10-30 13:57 ` [PATCH 4/5] gdb, gdbserver, btrace: allow disabling return compression Markus Metzger
2026-10-30 14:30 ` Eli Zaretskii
2026-10-30 13:57 ` [PATCH 5/5] gdb, gdbserver, btrace: resync on error Markus Metzger
2026-10-30 14:31 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261030135744.921562-1-markus.t.metzger@intel.com \
--to=markus.t.metzger@intel.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox