From patchwork Mon Dec 12 15:55:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 13071214 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41192C4167B for ; Mon, 12 Dec 2022 15:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7hgAragMiUA1WEMtLAL+D9A13O4m/I00XgSp6+yGxuM=; b=ZTOoJUGfcvbcGH 4jEp194Qcr2j4CYAYe5Wuj7FqP60FLuDk4UuCBNEVvszWKg7ZijdliUuMxvln26GYR2P99EZFkjyB +zb2V9dZFtOw5LcewAlnWPTS0gYPSv9tG5xMTYXDhjOxKSYd0sZbFicZ5eIeQclXir+i4s54spLae bODnbZxqsYK2k1V+sz3lsh6XpBn57i+vKPpaz7p+rszQn+a/PsrbdA6Mt7+6kdVyJXowcpmUA+cqr wEW3ycXsRIkptnpVFetq+7DluenvmnITy8jgu6k/XTC6UsJBJ1XwgnbfDVugH1ZjAx7IqOI4/WErs 4veqbeSyimFNyNmkEryw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4l9k-001lul-NF; Mon, 12 Dec 2022 15:55:52 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4l9g-001lqa-Cu for linux-arm-kernel@lists.infradead.org; Mon, 12 Dec 2022 15:55:50 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E147C1FB; Mon, 12 Dec 2022 07:56:19 -0800 (PST) Received: from e126815.warwick.arm.com (e126815.arm.com [10.32.32.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CFDCE3F71E; Mon, 12 Dec 2022 07:55:36 -0800 (PST) From: James Clark To: linux-perf-users@vger.kernel.org Cc: Al.Grant@arm.com, James Clark , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , Mike Leach , Leo Yan , Mathieu Poirier , Suzuki K Poulose , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Subject: [PATCH 0/5] perf: cs-etm: Print auxtrace info even if OpenCSD isn't linked Date: Mon, 12 Dec 2022 15:55:08 +0000 Message-Id: <20221212155513.2259623-1-james.clark@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221212_075548_720285_31EEA48A X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The auxtrace info header can be useful for debugging, and at the moment it's possible to record a file without OpenCSD linked but not view the header even though it should be possible to do. This patchset tidies up some of the related functions and improves some of the error messages before making the above possible in the last commit. Testing done: * Compiled on x86 and Arm both with and without CORESIGHT=1 * Ran the Coresight tests Applies to perf/core (0c3852adae8) James Clark (5): perf: cs-etm: Print unknown header version as an error perf: cs-etm: Remove unused stub methods perf: cs-etm: Tidy up auxtrace info header printing perf: cs-etm: Cleanup cs_etm__process_auxtrace_info() perf: cs-etm: Print auxtrace info even if OpenCSD isn't linked tools/perf/util/Build | 1 + tools/perf/util/cs-etm-base.c | 174 ++++++++++++++++++++++++++++ tools/perf/util/cs-etm.c | 208 +++------------------------------- tools/perf/util/cs-etm.h | 46 ++------ 4 files changed, 200 insertions(+), 229 deletions(-) create mode 100644 tools/perf/util/cs-etm-base.c