From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sQjuJnqi5GoseBQAWB0awg (envelope-from ) for ; Fri, 30 Oct 2026 09:58:18 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=myXJT+OI; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9AAFC378002; Fri, 30 Oct 2026 09:58:18 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E99021E023 for ; Fri, 30 Oct 2026 09:58:16 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C0BA44BA900D for ; Fri, 30 Oct 2026 13:58:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C0BA44BA900D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=myXJT+OI Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by sourceware.org (Postfix) with ESMTPS id 349474BA900E for ; Fri, 30 Oct 2026 13:57:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 349474BA900E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 349474BA900E Authentication-Results: sourceware.org; arc=none smtp.remote-ip=198.175.65.12 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793368669; cv=none; b=KcAbTzXzLuX7cwJGJN74xZgWhr+DlNzh4lhqceddS+wr+WXeayipbsIUBuF3A1+fqyCexYduGXIS3rbDBOeafvPn8lHi6SFC600MjuXqGDyvFLUuhp0hv10Wld2zbeUDJZTlX0zL9p4+3uBdFkXd/KO7jqZZdR/WfAwxZuMDBD4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793368669; c=relaxed/simple; bh=FysOIoMpIFRlStxlH/E3mjuXaKtwPbR9NPvswBjqb60=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BTJCMiow69mNFAK1vxW/0d/Yo0G8b3rvyfRzu39VaJ203cCg8xGnSbVE2M21eEzEVPHhdgPXO25fYHKTtF2BDpPcY2TLKCmGzwSn3+Xfj/dSpfwz8XpzDG1NGM8kTb94V2knvMHP4Q3pRxHmOzqkwqX8uSMcfjqCQasivcnCNro= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=myXJT+OI DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 349474BA900E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1793368669; x=1824904669; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=FysOIoMpIFRlStxlH/E3mjuXaKtwPbR9NPvswBjqb60=; b=myXJT+OI//hrio/smMJHmjQGmHoS7Oe59mqpRoQJcj6SRJ4kTAtvdvAV NFhZUnCISqZrVV4ICT/SAW8NNJuQM8FmCQlF/3Y7y3jpKIfCKefJqFKXJ 0ccJdNIQHzOO/MjCAYkp3eHSch4rtm3+h1Elwgdh74erg0B3L6/KH7VfL fBFVKBFiWL3dZ/zYf4FDS8Tyh3TtAKD6ryfDi6SE3MYobeKoiFroM444e K2zUpYi9bD7QIhPG7hjdDvjblVsjQzK+YGOiNJDazEVfWR73hIKCjpy/b iY1XpAXgjqsT6dZ1P9sQcXv0tE4uTxvoptFyqAxyT3LqxL+J+bqtMHA1E A==; X-CSE-ConnectionGUID: wD3RuQuhSkSlBtCzleqtaA== X-CSE-MsgGUID: HXTgOnHYRV2F7dx48aIjhw== X-IronPort-AV: E=McAfee;i="6800,10657,11951"; a="2011290" X-IronPort-AV: E=Sophos;i="6.27,186,1787036400"; d="scan'208";a="2011290" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2026 06:57:48 -0700 X-CSE-ConnectionGUID: oqkO7NVRT3uN0e8/wjb2Pw== X-CSE-MsgGUID: OpY+StdaTSeKq3pPCqDEYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,186,1787036400"; d="scan'208";a="5331805" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2026 06:57:47 -0700 From: Markus Metzger 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 Message-ID: <20261030135744.921562-1-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org 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.