From patchwork Mon Jul 15 16:07:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13733629 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 7790AC3DA4A for ; Mon, 15 Jul 2024 16:09:35 +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=+xj4WnCZiIcHOGnsLG80JsyfqbuFmUiGmEAiNSWvPZA=; b=KrEphbXOJmv+5cwr9QuSCnS+cw tWKHtPgw/y5Z4bKoa9v7gxx7XcQq0kE1HU8ARQZYuSEFYv+9oZIfDkQ4q6rxuWt5H3i6mf4Q3D8nj wqc1oO9/TrN1Fnm5YhzBCHdv/5fICUpYJGzeU4vkpdq7Arbelp/VwpmORUB2THCDb8jJVm1wF6p+T gLoIkrzImi7NB1ErEyuALyWoPJi/u4RN8H2SQUrmrQ43trZYMqbmXj2STOcb6ySKwpzA6WDQlyrTj RoltJ0u+hd9l/90W9oEWV9g2BaNOGuwly91QJO+ohMLQt40ef6CYv8xOJyEeMdO2/w1byqeahCGAV PY6wvW4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTOGR-00000007fSo-1eTM; Mon, 15 Jul 2024 16:09:23 +0000 Received: from mgamail.intel.com ([192.198.163.13]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTOF3-00000007ejl-0uyB for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2024 16:07:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721059677; x=1752595677; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xl/0bEpk3BRRcoORH2dbm/1s8wpRj/jEJl01LF/oJYM=; b=cBvHhQbn1g3zSN8GHpzkN3JQM2hXE4HZ/ppx/XVqJ45ANectMnNLraZA 8xiECudASNEGtRec1MPiy71/9BR9YKvK5jML0y1MAebT6M7vKSb3S4Bn7 +ta8+gZm2nQBvKQcsoTAXSSJN43uKk/zuP5IpZ58fcZYZSoySKnMjPTR1 llX/Q7pMr3O7f4XdK5Md5Lt/o+J4jq0G3Kda2rtIU+R6w6chAwbQ5eY+3 hpxtg8zATvkxwl5O+GzupCoy+R2GjPDYUenMb4ng5DLyQUFgqU5NoCcYn 6ElLrJu6TJxLeWvXe4woMfGgQEiT0XxJlf7M4J/gUXXIGFlfGh/yUYl2r Q==; X-CSE-ConnectionGUID: aajZImYsRKSdLqg2+dCFQA== X-CSE-MsgGUID: GNRdnRSzRGy7iOK9+7V8bQ== X-IronPort-AV: E=McAfee;i="6700,10204,11134"; a="21361233" X-IronPort-AV: E=Sophos;i="6.09,210,1716274800"; d="scan'208";a="21361233" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2024 09:07:55 -0700 X-CSE-ConnectionGUID: ONpEVzWrTpauaJImW+/7XA== X-CSE-MsgGUID: L+3ArP1uS26NkQmSUB+iwA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,210,1716274800"; d="scan'208";a="49413550" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.246.49.253]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2024 09:07:50 -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 V9 05/13] perf tools: Enable evsel__is_aux_event() to work for ARM/ARM64 Date: Mon, 15 Jul 2024 19:07:04 +0300 Message-Id: <20240715160712.127117-6-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240715160712.127117-1-adrian.hunter@intel.com> References: <20240715160712.127117-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-20240715_090757_312509_9B46956E X-CRM114-Status: GOOD ( 12.40 ) 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 Reviewed-by: Leo Yan --- 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 1c9541d01722..57dc94a6e38c 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 (strstarts(pmu->name, "arm_spe_")) pmu->mem_events = perf_mem_events_arm; } else if (strstarts(pmu->name, HISI_PTT_PMU_NAME)) { + pmu->auxtrace = true; pmu->selectable = true; #endif }