From patchwork Fri Jun 28 06:51:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13715541 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 2740FC2BBCA for ; Fri, 28 Jun 2024 06:52:22 +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:References:In-Reply-To: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:List-Owner; bh=6VGAEJmFohy0LuLEkwxAmnr/Gp1dMOSgS93QclPbQ8c=; b=orLf/LVKv+Fi6ahIBLnYBOXg8Q QteWFEtTCa5ktSJSl00shixn4ho++/fx5DMUQKyjVP5vcESUCPbmBSQ4P9g0QO3d7mhPChT56OA1D 4srjTbnVQsaJ64LdH+F7KFGRR8KPTo+uOHpQp3nd0SmRDjb+6z1rmSg7q3JPEMniEl0SkF2CsW/HX yps8XwtO+32s0LXA8tQbr0NDRpY+OHHClpdPcZ6FHsQ9bGhc4oTd8fCSEEkW6MPc6z2aAp5YND87w f8TyGv3PMlcX87jDT6cWGM1FmbQeGMKFCgTvhTJyrsZxw3XcgXSJ28/l4A0LmU39umctKg7aP/OoS xJqPsXYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sN5St-0000000Co09-3LdC; Fri, 28 Jun 2024 06:52:11 +0000 Received: from mgamail.intel.com ([198.175.65.16]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sN5Sf-0000000Cnij-2DNf for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 06:51:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719557518; x=1751093518; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UTYI9X6QTifs4NJwp7dVMi/w2wY+nJ8OweDviCzYQvI=; b=B1+pHXaVDxanawyg3zjPCOF3GL1xLMDsfmSBxBrXj4f8yurtLh9jEZvj j4pv1x4LMl9NNDgZiuPDONiV9ah/Ne/U02pxeL26lzOLE0EobJUIce+6V AnAfMEsR50elrHo17NekBSukLwad6I5l8ANu/29YQDof65i8U+LvxXKJ/ ZJWgdBhLDLBANWCOJoCzMAE9cjSfYpC/WPoI9EwmPDgA5AgNOOXiyZdJE dCL/H7KAjUj9JKTI8BuqVToNHkvqDuk1upkSzVGNRIWs62VcCobPMN73A FhB0MvAnbBrAqLaBeyAZBGDuB/mp/id7FkTPAWymFmprbtoaJoMCuPUVC g==; X-CSE-ConnectionGUID: g+ZGse7vT9WINCCsOcPgnA== X-CSE-MsgGUID: o2WlVKpZTCiYiZkvWD2crw== X-IronPort-AV: E=McAfee;i="6700,10204,11116"; a="16857163" X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="16857163" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2024 23:51:58 -0700 X-CSE-ConnectionGUID: HPTirA3FTImAVSVacaACdQ== X-CSE-MsgGUID: 8hnEsJLtSICwoTjCYiLROg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="75386696" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.246.49.253]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2024 23:51:51 -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 V8 04/12] perf tools: Enable evsel__is_aux_event() to work for ARM/ARM64 Date: Fri, 28 Jun 2024 09:51:03 +0300 Message-Id: <20240628065111.59718-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240628065111.59718-1-adrian.hunter@intel.com> References: <20240628065111.59718-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-20240627_235157_671589_BA500974 X-CRM114-Status: GOOD ( 12.46 ) 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 6b544edbd3f6..df0a85dd42d2 100644 --- a/tools/perf/arch/arm/util/pmu.c +++ b/tools/perf/arch/arm/util/pmu.c @@ -23,16 +23,19 @@ void perf_pmu__arch_init(struct perf_pmu *pmu) #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 }