From patchwork Thu Feb 8 11:31:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13549675 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 D0924C4828F for ; Thu, 8 Feb 2024 11:32:34 +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=nZy+g15CoWWkO8NyyaPf0YsTEBheWw7RnNcI9Z1T6LU=; b=aGUbL/O393yPV8 ki+MFBavW4TV3wXVnmhvw158rZ6t++pmmeXPuhxupXVHLkieGG7abDVG9sCOFGcHK1uDe34O6pi5c rQqLJUCbexnDeCaJwh6Q8A5p4+HlNo0bqCmvVi7TCfZgmFuYraooVbE6RfXZM3s1zi7kRlw50vGf3 XNWF8cnYZmee8qJTp79xSNR0mCgcaDzq099lfL7Uj8w7vfV1wya+yqMcU3z08Cfr/H/NMttZnAUhS bq7nNF6MDbNuPioocan4kMwy7RQhiqSHgHPohMjLu61Ub2PFyu+fYCGrx/2qADeP7aq6O1F1ZsMs5 jUPUQsKAHn3VmH+oI87w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY2de-0000000DZni-3Q8I; Thu, 08 Feb 2024 11:32:18 +0000 Received: from mgamail.intel.com ([192.198.163.15]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY2da-0000000DZag-1YMQ for linux-arm-kernel@lists.infradead.org; Thu, 08 Feb 2024 11:32:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707391935; x=1738927935; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/uNuO1osfQ/KqtLrzS800xAbLzNCQEyTMRkrAuppesM=; b=gA3fkQg7/wNDZFQiXBGLvZyz1+P7gs8+BFhLDzue4pbwytsstQCkwwRd GWOR+HbZerGZwYsBhZdklU4bONdZ2NAcOmxK39ZG7N/frKcQN6gXoOOwA gcyd1kxVRNc7Q7xCslxgjeCu4DRfmbLJYQgYnGD9nk8YR8MzGEO6JjaP5 BtJGCUQJcM59ui29C2A3tRvD7uKTeUaDeQKlYbBoPHZVga/PEkixRaW0k nD257bVz8C7MdrbOY+diMpQlvAF44skK2yT7w5u6jqHrEw9CInrabJxH5 0try+5bUoD9jq88JogY1syxhzZALyGis8FV5dy4W36yL8PWh6wyk38LnK Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10977"; a="1345603" X-IronPort-AV: E=Sophos;i="6.05,253,1701158400"; d="scan'208";a="1345603" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 03:32:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,253,1701158400"; d="scan'208";a="1957534" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.251.219.88]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 03:32:08 -0800 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 V5 05/12] perf tools: Enable evsel__is_aux_event() to work for S390_CPUMSF Date: Thu, 8 Feb 2024 13:31:20 +0200 Message-Id: <20240208113127.22216-6-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240208113127.22216-1-adrian.hunter@intel.com> References: <20240208113127.22216-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-20240208_033214_607757_E9415C96 X-CRM114-Status: GOOD ( 14.52 ) 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 evsel__is_aux_event() identifies AUX area tracing selected events. S390_CPUMSF uses a raw event type (PERF_TYPE_RAW - refer s390_cpumsf_evsel_is_auxtrace()) not a PMU type value that could be checked in evsel__is_aux_event(). However it sets needs_auxtrace_mmap (refer auxtrace_record__init()), so check that first. 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 --- tools/perf/util/pmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 437386dedd5c..40be43f1f648 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -1099,8 +1099,12 @@ void perf_pmu__warn_invalid_formats(struct perf_pmu *pmu) bool evsel__is_aux_event(const struct evsel *evsel) { - struct perf_pmu *pmu = evsel__find_pmu(evsel); + struct perf_pmu *pmu; + + if (evsel->needs_auxtrace_mmap) + return true; + pmu = evsel__find_pmu(evsel); return pmu && pmu->auxtrace; }