From patchwork Fri Jun 28 06:51: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: 13715542 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 4F238C3064D for ; Fri, 28 Jun 2024 06:52:32 +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=QeQ6Z3HDBRX+kA+fDqI0JneHYbyqQmkK6J9DGrKWgSc=; b=J3k5rNTafdDS6w1Ul850Ys/Iyu SRVgPgsT5sI9iXDUIXse5wSJDD+blBJYYgYzJU59unwBWA/4kK2ucTT6153OsiuMdSkYbfMmcDMVJ 3eeShM/SswizkCinbF2AeufUV094un4/Z2eA6D9LRUZgRSW9pZSS/X3j+KXmo0sPjgTY8Si+V2TmF o5Y2FvtSeGuX+UV6S8HLlK1JCsuBjks10vHtIpDV+UI9863XbJ0rFwjliEZRsClgTJa9CBP2sl8r5 nE34UOjlu2kyl6wCO1E5mkAC5oySY85Xbl1AnuZORVZlpxsg0LkmpM52AW4RlEe8zTwAXPv53y+Gy SxgkabHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sN5T2-0000000Co5a-1wpr; Fri, 28 Jun 2024 06:52:20 +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 1sN5Sm-0000000Cnij-0NVp for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 06:52:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719557525; x=1751093525; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RR3rwbnMC6ghBhDqx5zv3Qqug9YamguX/X6OJMJG9Fw=; b=Ix/nYGzOFVwaD5FMnNQL9ATUCkE+3HL60SaqHdY2u5pUVxDuTiTDsC8q Z66SElHdH+yFqvMSV1GPM/9IUbCgEH+rqHE/umyQ6/plGzcVFiqFMXHsr ab+xLB5+eMkLjH96befnZCP6EvYBJi7PSFw5QoGCLiLo1B8rZNfL92AG9 4+9sDeRXdovwSUBlx3fDHwremdPnmGUHtt5QV3O+niHT2paw9N2Oe333i ycbpo1WCOXpg8eKlEw0sDtWO0yyIT3nRTVZyj/6QzFtqGcVAFXeep9u2B b0dkfXy7JAT3A3M0PfwKbZ8prXUbIailcID0/7chXhg2U+XqaB1P7ochk A==; X-CSE-ConnectionGUID: NNco1/kaRLin3+oSmXkiew== X-CSE-MsgGUID: nTBOfH15QWO34oXoM3djPQ== X-IronPort-AV: E=McAfee;i="6700,10204,11116"; a="16857178" X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="16857178" 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:52:04 -0700 X-CSE-ConnectionGUID: dX0AHA12Tyy1S+nDr9PdAg== X-CSE-MsgGUID: MfLECR1eRSK0ZrU/H4i2Ow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,168,1716274800"; d="scan'208";a="75386703" 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:58 -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 05/12] perf tools: Enable evsel__is_aux_event() to work for S390_CPUMSF Date: Fri, 28 Jun 2024 09:51:04 +0300 Message-Id: <20240628065111.59718-6-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_235204_410770_4375F732 X-CRM114-Status: GOOD ( 14.78 ) 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 Reviewed-by: Andi Kleen --- 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 c94a91645b21..05deea7724eb 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -1182,8 +1182,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; }