From patchwork Tue Aug 6 15:55:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13755193 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 D4E7FC52D70 for ; Tue, 6 Aug 2024 16:00:05 +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=owWye5GnGwJuCAdOGz16QsEIGPyRKsL4P6PWekfhPaI=; b=3oqV0mbEmoy3OqVEGNbQK+LSL5 gQ3OJ77sSOhHq9WpxLTltfz6ZbCmUmzO12F7AQ/auvMNH7Pffm0U/nmMgySc4eFfaRuvy+ztdDm+e YTBS2Y7uGhGJi/XBRQAIjHMkfRs1HrDRyiKBg3sHzMIZXEgz/ztp0CCcP0f70qArDIsoL/uMXVV8t YAA1Y2R35J7ZNpDSxdKplyfFSy7QxPBfQhoUoD590Ax0AH0SB5YuRk4oAQDduSzYDdKZ3almB3b2C On+Z0R3NG26jIGUfnk4udUdoOfrPLJH5RGwISnCmVvygS/aGsVtng8tuJmYZ6RduiRKPNsu70uuQz oVddMzKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbMbL-00000002GVY-0fDy; Tue, 06 Aug 2024 15:59:55 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbMYe-00000002Fhc-42KH for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 15:57:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722959829; x=1754495829; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XV9oO1VsQp+MSv2Py01Sm9xIIkQ3cEXow5zO+iPUsrs=; b=aB7Ur3/W/ME75Lzifv9iTO5o15S4z4bL3S6GfczzsERBZdxNlQj1F46b +uM44yonvSR3XZEUPIjwbUokdmZhibSf2bdK9zNV694AWSNWJHXTALTSr DgII3hDAojrDQomC72s9Ik3UbCMYS9ypdQW/1Yv/7SX3HGsE1M8c2Q88L CLvPCWRermXnmjd021pea+oUF4UWxi2jUUjFeDbNI1M9GsjFtbp51IpKm BxpZdXcAUo5SzI9xbDrQU2yF/u0kdVpTzRZ5DynJSooOJQvBGAZ5wRAb/ DGAN4x4LzLV49IKYgSdjUZoKsP3PhP7HB9AdDqZSHOyC8Q1Yy0ZY669hv Q==; X-CSE-ConnectionGUID: cxXYbhdXSUePkfAwyx22og== X-CSE-MsgGUID: FFgSjOmaQLKwx0GVd9KQmQ== X-IronPort-AV: E=McAfee;i="6700,10204,11156"; a="43514103" X-IronPort-AV: E=Sophos;i="6.09,268,1716274800"; d="scan'208";a="43514103" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Aug 2024 08:55:51 -0700 X-CSE-ConnectionGUID: WQtCCycpS62r1T2KSkjJ+g== X-CSE-MsgGUID: YaiFC+W+SlGKDaqa3HleVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,268,1716274800"; d="scan'208";a="56631163" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.94.248.17]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Aug 2024 08:55:46 -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 V11 03/10] perf/x86/intel: Do not enable large PEBS for events with aux actions or aux sampling Date: Tue, 6 Aug 2024 18:55:07 +0300 Message-Id: <20240806155514.17900-4-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240806155514.17900-1-adrian.hunter@intel.com> References: <20240806155514.17900-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-20240806_085709_351464_BB629A82 X-CRM114-Status: GOOD ( 13.39 ) 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 0c9c2706d4ec..3d3b841112b3 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; }