Message ID | 20240902114949.918485-1-felix.willgerodt@intel.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6B105384CB95 for <patchwork@sourceware.org>; Mon, 2 Sep 2024 11:51:10 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by sourceware.org (Postfix) with ESMTPS id 4017A3858401 for <gdb-patches@sourceware.org>; Mon, 2 Sep 2024 11:50:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4017A3858401 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 4017A3858401 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725277841; cv=none; b=ozQ1zDkvwiv+2dUXA0rGUfvSsP+jbxu945kZZDRmqRXYNyMGwkorL6TJ+TQ4YF4Z1VuoacAPPlB7Phgx/8rKLcAzWRgVrhWN41vS7B3gngpozLDYWUbE0s36I+GyrezMD1xSqf7HwYNEuuDFnwdJUgCmHAyeAD3HEcT3uFR//Z4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725277841; c=relaxed/simple; bh=4N1YS70OTxbTgZt3WXGYfW/9HZNkUzVYUoXoXunZIBA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=KfDPMphV5d5UtgvrOlOdnX1IfEWMMgb1Jqmu43nL6nRBx+DdlM6iE+JM++k9C+RPsLWcryw27CGg9TrpwpfDUAlfLsRy2claL1j3PT7eg1l4HsaqPtRgHouER9aHDl3LoIPlZxtK5DvYGDNUxCyFH6Qg36W4zqNY47dYzorzmGY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725277839; x=1756813839; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=4N1YS70OTxbTgZt3WXGYfW/9HZNkUzVYUoXoXunZIBA=; b=ieQA5DjKni6HNysmsU69W+dHtm7+fxiQLVcA1X4+BI4NNA/HjIPP0tUI X/aaJvbCP+g0mER8VlCWcutsmNg81wDsXM21J1UKom8mKFnBV7L8wMIKN 9R6jLm2ne0Al3Xc+N57G3qzIM04unEvvbf7xWAUiLLD3Q7/EBxkHFWVH6 c70wN28wqUh2Lmjgo+IjIcRsbLSILV9djx2xTZvFK4/9SiAQUIL1jJ6MA b1NdYWZjtMdzzMEG6Cc1776c7v/QtG7Ba7LIPMdUqr5zCyYZ07lDiiIyL Mr4oZUyO4XKNAcWnBPeCw7fq5XkgNWqKSome9oPfXTXUAt/Q3MZEdLTnN w==; X-CSE-ConnectionGUID: z18IO+5wRCGKva1bW5cR6w== X-CSE-MsgGUID: 1ETX8Hv7SCuaOMkyh14Bdg== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="41330851" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="41330851" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 04:50:37 -0700 X-CSE-ConnectionGUID: hSBwkPJHTzyMpwObgStAyQ== X-CSE-MsgGUID: HSvPLnsOSjSK4jhCgi7wWQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="87821388" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 04:50:36 -0700 From: Felix Willgerodt <felix.willgerodt@intel.com> To: gdb-patches@sourceware.org, markus.t.metzger@intel.com Subject: [PATCH 0/7] btrace: Intel PT event tracing support Date: Mon, 2 Sep 2024 13:49:42 +0200 Message-Id: <20240902114949.918485-1-felix.willgerodt@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
btrace: Intel PT event tracing support
|
|
Message
Felix Willgerodt
Sept. 2, 2024, 11:49 a.m. UTC
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