From patchwork Fri May 31 05:57:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13681153 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 59DE5C25B75 for ; Fri, 31 May 2024 05:58:55 +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:References:In-Reply-To: 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: List-Owner; bh=GDwYeb6jAR257q88AtQ304hTX3iQufuGc30UJB7cVAY=; b=RfRU4MBhbpSZwG rSUY63Fsx7Ajhfj1U1scppoP4/rfeZrQTCBhCTQI7DrTitdZXUpBVXHThrjVm1JpF5QOLs1jP2Ng/ fMOtMa4+sKz6O2L7bP/0gmDsrxiUROYUJYw4GyoTzIlHOdq1LTI/cHaKvHLYT0oPr6pJ3+LVJQ1uM 9UlKuGosXzMKifsNBcPv5W2K/62IFNtQpSFbouk6G2KOzT44LBY8fGfGHngZKL6DaztJRaNMO5CrR eHj3KQeSNtDoe0Lu2CakbcWlD1ZkHj+up4PryqfT7PJMPHSrqNklybpAKREHTxC1wXV5PKQs82MRy GkH/GMyN4Hd1K5PXb8kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCvHm-00000009K4p-1Ggm; Fri, 31 May 2024 05:58:42 +0000 Received: from mgamail.intel.com ([192.198.163.10]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCvHS-00000009Jqn-3O67 for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2024 05:58:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717135102; x=1748671102; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UW2BCplhMWf0Uk9H/TC84K3bNxl7b2FFw/QfP+F2heE=; b=dLCKt+6W2vxdGqMHzj6Fbr/35H+0Zw7HoZ7ITdhZhg5K4Wkssip47w/+ Hld05HmqNgD/l2RXuCrnbeDkmgeXgTT4k5pKs+Br9zSGhaCX4HCPW5BTh 7MvSOzYN+e5+fPjpHrWHNWUG7JcCw6S7ICL2V2CdH1OpslQNr/zCg990N XjULCTaFsmkOM7U3M2OhM4gMcdfbxGW4DnPEApMV8rZ/xoootkEHkhfjH EtJCAYjr8d/c0B4q5gkqc12OuubQlxACrXZ7mrahDl7bBf4zcqnTqJCB0 rKOELJTfN5IaRMgthiT6+k1+r1MkJjnPvj2pjPxuZmHsRTzKxAfw1+P1f Q==; X-CSE-ConnectionGUID: f5dq4ucTR+OFddWiN7krmQ== X-CSE-MsgGUID: 8tR0i0dlQ/+JtX7OGctcLA== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="25068178" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="25068178" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 22:58:12 -0700 X-CSE-ConnectionGUID: twGzDCCdSUaAUrILk06/KA== X-CSE-MsgGUID: OJ3TFkroQBCSQJo1IKuUsw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="40510896" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.246.41.28]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 22:58:08 -0700 From: Adrian Hunter To: Peter Zijlstra Cc: Ingo Molnar , Mark Rutland , Alexander Shishkin , Heiko Carstens , Thomas Richter , Hendrik Brueckner , Suzuki K Poulose , Mike Leach , James Clark , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Yicong Yang , Jonathan Cameron , Will Deacon , Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , Ian Rogers , Andi Kleen , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH V7 04/12] perf tools: Enable evsel__is_aux_event() to work for ARM/ARM64 Date: Fri, 31 May 2024 08:57:23 +0300 Message-Id: <20240531055731.12541-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531055731.12541-1-adrian.hunter@intel.com> References: <20240531055731.12541-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240530_225823_027504_DA0B23ED X-CRM114-Status: GOOD ( 12.34 ) 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 Set pmu->auxtrace on ARM/ARM64 AUX area PMUs. evsel__is_aux_event() needs the setting to identify AUX area tracing selected events. Currently, the features that use evsel__is_aux_event() are used only by Intel PT, but that may change in the future. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Reviewed-by: Andi Kleen --- tools/perf/arch/arm/util/pmu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c index 8b7cb68ba1a8..668a4310cb69 100644 --- a/tools/perf/arch/arm/util/pmu.c +++ b/tools/perf/arch/arm/util/pmu.c @@ -20,16 +20,19 @@ void perf_pmu__arch_init(struct perf_pmu *pmu __maybe_unused) #ifdef HAVE_AUXTRACE_SUPPORT if (!strcmp(pmu->name, CORESIGHT_ETM_PMU_NAME)) { /* add ETM default config here */ + pmu->auxtrace = true; pmu->selectable = true; pmu->perf_event_attr_init_default = cs_etm_get_default_config; #if defined(__aarch64__) } else if (strstarts(pmu->name, ARM_SPE_PMU_NAME)) { + pmu->auxtrace = true; pmu->selectable = true; pmu->is_uncore = false; pmu->perf_event_attr_init_default = arm_spe_pmu_default_config; if (!strcmp(pmu->name, "arm_spe_0")) pmu->mem_events = perf_mem_events_arm; } else if (strstarts(pmu->name, HISI_PTT_PMU_NAME)) { + pmu->auxtrace = true; pmu->selectable = true; #endif }