From patchwork Tue Aug 6 20:41:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 13755294 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 680D2C52D76 for ; Tue, 6 Aug 2024 20:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=0EClxIy8fLrwmSQhDG1DDcnw3hLuuJx6mJ6q7Y+zJKg=; b=qscoUOCRJwkO6IIQEahDnJYlzj jDHYpA70jpeW1ydoJYe/NWy7otY9r8jkiz8e7JTYjbgMXbgcY9HFMJNNbVGtTkYbCrYU4Gsh8WEDc FI57VHWuLgU7VWipt1AluzkiYOSwmPeG9OHX5q1jlv4GosNkoo9/RcHl9LUUCndvZiRzSs5wDqg4U Q3jcXFFSYEhXXvwjoCPTDaI+GpGXhkW+dSTRFpe9CSEZp3830KTm6Ry/rZHO1eT6u9CIeUf2uWl5F UR/TOWJ1TikbuPQFH2qvb6YCzNYBerVu0/HDiLkQDWxIcUbXj1zR6m1q5eHPGvFcT5tkIiyANpKxh luyUMgtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbR1D-00000002qeX-1YPN; Tue, 06 Aug 2024 20:42:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbR08-00000002qM8-2tKL for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 20:41:51 +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 559BFFEC; Tue, 6 Aug 2024 13:42:11 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B4E983F766; Tue, 6 Aug 2024 13:41:43 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Namhyung Kim , Ian Rogers , Adrian Hunter , James Clark , Suzuki K Poulose , Mike Leach , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Liang, Kan" Cc: Leo Yan Subject: [PATCH v1 0/9] perf auxtrace: Refactor with evsel__is_aux_event() Date: Tue, 6 Aug 2024 21:41:21 +0100 Message-Id: <20240806204130.720977-1-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240806_134149_127946_53DB4B85 X-CRM114-Status: UNSURE ( 8.24 ) 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 As the evsel__is_aux_event() function can be used to detect AUX event, it is not necessary for every AUX module to maintain a 'pmu_type' field and compare it for detecting AUX event. This patch series refactors auxtrace with using evsel__is_aux_event(), and remove unused the 'pmu_type' field from every AXU module's structure. This series has been tested on Arm SPE and Intel PT. Leo Yan (9): perf auxtrace: Use evsel__is_aux_event() for checking AUX event perf auxtrace: Remove unused 'pmu' pointer from struct auxtrace_record perf auxtrace: Refactor auxtrace__evsel_is_auxtrace() perf arm-spe: Remove the 'pmu_type' field perf cs-etm: Remove the 'pmu_type' field perf hisi-ptt: Remove the unused 'pmu_type' field perf intel-bts: Remove the 'pmu_type' field perf intel-pt: Remove the 'pmu_type' field perf s390-cpumsf: Remove the unused 'pmu_type' field tools/perf/arch/arm/util/cs-etm.c | 1 - tools/perf/arch/arm64/util/arm-spe.c | 1 - tools/perf/arch/arm64/util/hisi-ptt.c | 1 - tools/perf/arch/x86/util/intel-bts.c | 1 - tools/perf/arch/x86/util/intel-pt.c | 1 - tools/perf/util/arm-spe.c | 13 +------- tools/perf/util/auxtrace.c | 8 ++--- tools/perf/util/auxtrace.h | 3 -- tools/perf/util/cs-etm.c | 17 ++-------- tools/perf/util/hisi-ptt.c | 11 ------- tools/perf/util/intel-bts.c | 14 +------- tools/perf/util/intel-pt.c | 46 ++++++++++----------------- tools/perf/util/s390-cpumsf.c | 11 ------- 13 files changed, 25 insertions(+), 103 deletions(-)