From patchwork Tue Oct 22 15:59:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13845961 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 F2F60D2CDFD for ; Tue, 22 Oct 2024 16:30: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: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=MhnHgTHvXXByXykKlPXMmMk1Pzju6w8W5ajfPf38FAk=; b=lT5queVEpYkPrVWHj2jUOeu5xd h7Jv6q9JZMdWGsx/1NHE+yWumdq/oFAAL1eMtDFTew/ZhWZa3B3BuavL9FSr6aQnXQ7M9qVra77m3 LGfLUPgh0FBr3xjuck5CDN86CKlvCVDAHn0ZrhXjn9Cdfr1Vi3sC3zt0yN+eShz0pGPmuziI3SWP+ EmSXe06jiOWUgkug0SNa5uLR/M8CxWIRlYFod+V/kJBJR3dA9d0UAZ1v26P0DKIvHxw4Wrsy1UBr4 da8cLr4/2JsG6dxNhH0Iid9y2FgR6/oXTXYQ5eZJDBydPihUYD5veqFlWSRotI5y4n+J6PJGZYNfl LWysVMRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3HmM-0000000BTBz-0aKd; Tue, 22 Oct 2024 16:30:42 +0000 Received: from mgamail.intel.com ([192.198.163.15]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3HIw-0000000BLjY-28ns for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2024 16:00:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729612819; x=1761148819; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QStAwdkye38HLwLvAfPzq8FmSRXF3FozST6s+/YdPUQ=; b=N7/VCoWv9Ii5LcZpbPVeikFZfWWHubyGn3lhFKsgSe0cZqNzETtbNxrT xlFPXucNPZ5bjNuUbNe6wFVS7yeHgiHezqwDNSlMjqFe6sarViWrDy18p SvCFdwxRqrdMprvuD48W9oFkvwkEDnlV1zDjN9QYr5KsZJZotwPAH0PAU kQsWcGwlh5EvxOmEYktIIE91sTQOd6kmVo0rWKybwTqgsjqa9kzVtvaOQ ym4DgVBBT3dJfRoQIdD3Lysr2LNKtb8PBm78C/yy5hLEmrT/b9zghmQRg iMyKLzj4p2wfUI8p9gGAhqT4TVHX2nh9pWNeCsBAeMjI8EI/93USzi/aC Q==; X-CSE-ConnectionGUID: 9WgI2TP3Qo2na6t9LIMEdw== X-CSE-MsgGUID: pB35cVMjQlSecalIizNfmw== X-IronPort-AV: E=McAfee;i="6700,10204,11233"; a="29270907" X-IronPort-AV: E=Sophos;i="6.11,223,1725346800"; d="scan'208";a="29270907" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2024 09:00:15 -0700 X-CSE-ConnectionGUID: 4u1D0BmRTmewWLHKsfHjeA== X-CSE-MsgGUID: 9SFK0AObQkimpU1fYFrlpQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,223,1725346800"; d="scan'208";a="79858526" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.ger.corp.intel.com) ([10.246.16.81]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2024 09:00:06 -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 , Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org, H Peter Anvin , Kan Liang , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH V14 04/11] perf/x86/intel: Do not enable large PEBS for events with aux actions or aux sampling Date: Tue, 22 Oct 2024 18:59:10 +0300 Message-ID: <20241022155920.17511-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241022155920.17511-1-adrian.hunter@intel.com> References: <20241022155920.17511-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-20241022_090018_608500_B9F5B4E1 X-CRM114-Status: GOOD ( 13.01 ) 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 Events with aux actions or aux sampling expect the PMI to coincide with the event, which does not happen for large PEBS, so do not enable large PEBS in that case. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen --- Changes in V11: Remove definition of has_aux_action() because it has already been added as an inline function. arch/x86/events/intel/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 7ca40002a19b..bb284aff7bfd 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -3962,8 +3962,8 @@ static int intel_pmu_hw_config(struct perf_event *event) if (!(event->attr.freq || (event->attr.wakeup_events && !event->attr.watermark))) { event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD; - if (!(event->attr.sample_type & - ~intel_pmu_large_pebs_flags(event))) { + if (!(event->attr.sample_type & ~intel_pmu_large_pebs_flags(event)) && + !has_aux_action(event)) { event->hw.flags |= PERF_X86_EVENT_LARGE_PEBS; event->attach_state |= PERF_ATTACH_SCHED_CB; }