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: 2882 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2325407wrr; Mon, 12 Dec 2022 08:05:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf5FoljTZDrKe+rrxvqwFKc3YTtGG5d2ZHkFYMQYsiGfLgGJBSUSEbPERXJ8E9n+LnoDUWhh X-Received: by 2002:a62:2905:0:b0:56b:ff19:bad5 with SMTP id p5-20020a622905000000b0056bff19bad5mr14377385pfp.0.1670861156635; Mon, 12 Dec 2022 08:05:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670861156; cv=none; d=google.com; s=arc-20160816; b=wOYY8UFt1jYez5Ioy+WX0Bi+cLwHrDCqnZ1EMKlEOj1x8BCaeMnp2UbUk5TzWdE6G7 m/KSsnOLIfHgUfDPrL3Msz6ZVo5mhCrlKas+98fG4mqu/qKJXGHxc6vfPNRKKd/bFJAa nr3pDuMHLeu+qyAzSMqnN5I2ZMxPT4LCc+nEAufDoX9YdouIWhLFAHe/XoOiLmfgBs18 oOCQOTpZnMirFr+kE+7Wm9tGytu5/2hxxfCPXb6XWteL8+hwiV6Ed5npsXXMwgX580sU IE0mkQ41yWcVeKvqmF35+5+iAHVK9xJYM0AjW6DDblJE3LjXyvETpqTMd/8WDh6+7c0n 6Y2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=kKx7c63pWo19zre9zw5wzMy8hC5oie/fNce3OYQ3XLs=; b=AMYB6PJ8M4M+arfvMApLqOEQBg7U0I1YWQJU4dgI7pMiVnUW93k7P1puVnAXE2ZF3j aIWukih37/kMTUhu8RFKAWkcIiB0sxP2nmFa9Y3JUUtDV+jd7mFIfi9rAbGNJlOvs5qY IOkSO05MQKmlGK4YjHqBCwrOsduMXTaSAwJSi3OzOsIf6BeP8BsUY8dtF5/Pht8r8bDU n/NnSxx0/sPRjBA7e4GkGM6fbkWMYQGSXgM99IjU+kan8/ISYZRczqTNOjh4J3R0NBut /wzH41pGyXHqP9Z+lB88AYRLULBf9tRHLYF6uwOQeZR8LcG4sBE4Y5iau60Y8tgVR6Ko W24w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb19-20020a056a004c9300b005774f410e52si9536298pfb.303.2022.12.12.08.05.34; Mon, 12 Dec 2022 08:05:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232631AbiLLPzr (ORCPT + 99 others); Mon, 12 Dec 2022 10:55:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232616AbiLLPzn (ORCPT ); Mon, 12 Dec 2022 10:55:43 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 079DC64EE; Mon, 12 Dec 2022 07:55:39 -0800 (PST) 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752024908056339783?= X-GMAIL-MSGID: =?utf-8?q?1752024908056339783?= 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