[V5,03/12] perf/x86/intel: Do not enable large PEBS for events with aux actions or aux sampling
Message ID | 20240208113127.22216-4-adrian.hunter@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-57962-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp99736dyd; Thu, 8 Feb 2024 03:32:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXwuNsdgiYCDN9cHAed02VHtIvaycgg9DOmvmSx9JoWv3GRN7NyC93ddfNfMrBEURU3dDIbMI9NDofFtEPWQcR6lGBC3A== X-Google-Smtp-Source: AGHT+IHCnIRMU1Q4zXxBW7CQHWRwLlfxSOm+Q+Bm2pf44vIWv6Brbi7X/xgpnLn2dCDt2g59oxuX X-Received: by 2002:a50:ec84:0:b0:55e:ea35:1da4 with SMTP id e4-20020a50ec84000000b0055eea351da4mr5718576edr.4.1707391979573; Thu, 08 Feb 2024 03:32:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707391979; cv=pass; d=google.com; s=arc-20160816; b=OxUHjelSeE3cMdCuYoS+yXPJlzKAr1vpAJJS0k8Ig/fpUQ9WC30dhqlf7NDs3tNPFM DqxKQPT7DBQ4C01bno4M/i04Iuugw3NM6iwgQE/T/fTcCrbNRtxAXlpoAjSgfdmr9kWo wwAJz0eLbjoz7Wfdb8dxS0BFvKFtlGCuaxuHhGGkK79IRa3MBs6k8IHZSkberWU50hKH oELvGolkn8Aiccbbcb3Kbw4t365SxoIUOrCBafcKBAhVWoa0leqNlfqx7PU+rT2GFj+a X7gZnmgGVQsr5Q4nBOS6cbdoYVqezNMGhKmJDTuE+m2W6aMBnUxfxll5FVjB/RdpnCx+ 0J/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=pPrWuGU9BYcinxnrgFFLKon4UrDUwc9o6dTRHvFpQ8c=; fh=YPxTHplBLZMNfUa2Yvd+nNr/6WpYcHvayMBXcPVs8P8=; b=OtcA0ZTQqxMXqgsrt4wdMqt0253tXZ8UQ/I7IojIqpga39dAoDMwfTfN71ZoKtz/3s Oh+7EGdBw2ed+a1lWes+R2MtSO7raXiZGAuLDs1DU3O0PPft3PY+pek+UvKIVWXsGK4T kOUaT96rEz+a9h3BPis+Gkeq8H+jYBMdS5CxQZj4hAz003MDJS2Qi+NWyRTAPGfJ+dLm qRbPxR66lm3GBSdxFuEPTd93fe4Q4+LBqet0qZziDTZvfl2vNfWUM4wCq9PLlCmwp4CF pPDvGhiMJ0R7NeOXTBPK/s+kxxfqryCdO2lDoHW+KcnBxF9fAuwepdAQbOEFAc90YcYn swrw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G6LFcP28; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-57962-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57962-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXgQ0q4L+Hchc8ocVrqPbdMqw4ljWlMKYAJLSTCgn42tpt0mXgiUErMa+h/6SmTSU2TljIhmgfi5TDYI0zbRHN9VjsWBQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l8-20020a056402124800b005610ef3032bsi457288edw.205.2024.02.08.03.32.59 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 03:32:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57962-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G6LFcP28; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-57962-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57962-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2D40F1F28A0A for <ouuuleilei@gmail.com>; Thu, 8 Feb 2024 11:32:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5FA46F50C; Thu, 8 Feb 2024 11:32:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="G6LFcP28" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FE0A71B4A; Thu, 8 Feb 2024 11:32:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707391923; cv=none; b=b6Y47gioKS6M7aT3LBL3NdJ0bYRV6ljtjVVgaCDTpgLOPcFs98D81scBTqhGtFETIMkLSjr0atuEa1jKKLyLOn2FNN0qz8/+Tb62C1TeDu2U2yzq26zSNuGpoccFKe3KG8UgkOznBAT3yp01T0QzzOy42PBBy+Wwx14HG+XLo/M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707391923; c=relaxed/simple; bh=ymurIB97b11IqH9GZGJPPvkYT9r0Cf4QevmMQfDhVpY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BHuzshRCFuBqCYPvXzHWx52HfWDhkG6IyWX2KkoBH0XLdXjJvF00tr9ZSg+3mnfwWLz7ckCLBRU4xxCBd4dQHi+k8JPk01GZpfnWRyt5SxPhT2K5SrJjOoYi4tqoIFFwOC1QtYkgZAKuJlLQr1Gz7+pnzm74quMWzyeSJkCeuQQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=G6LFcP28; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707391923; x=1738927923; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ymurIB97b11IqH9GZGJPPvkYT9r0Cf4QevmMQfDhVpY=; b=G6LFcP28S+N2D4PREKdYvWWX2igv4nKU6DF9T2k6ULGmBRQRMSOJC5D4 HgvNbO+6v+CgNAxBkxGUcvq6bkWDHFnmn0lVEADPcs1eKOalRdc0EX4oK 7X/P54TrkEAZ16UJru49s1I67ytYsbhiHaK5XaSjuZMBAQTVe9oTdz+BO j9OonfEbn05bqGvUXvC333dZ1GZ6XQ6JJun4ham0EJ6wV9LAHcfBJhsRQ 4/7sxsdBnj3yudBjXB2e2l/dWU4AaBLR/wW77i7JRCI9uTaLZwva8RbDA TXgdiEXYVIi4egLQNkB2hgCGdkKbg/3FKnl37ZO2rOdV03iai5CTdrgFL A==; X-IronPort-AV: E=McAfee;i="6600,9927,10977"; a="1345508" X-IronPort-AV: E=Sophos;i="6.05,253,1701158400"; d="scan'208";a="1345508" 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:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,253,1701158400"; d="scan'208";a="1957470" 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:31:56 -0800 From: Adrian Hunter <adrian.hunter@intel.com> To: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Heiko Carstens <hca@linux.ibm.com>, Thomas Richter <tmricht@linux.ibm.com>, Hendrik Brueckner <brueckner@linux.ibm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Mike Leach <mike.leach@linaro.org>, James Clark <james.clark@arm.com>, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Yicong Yang <yangyicong@hisilicon.com>, Jonathan Cameron <jonathan.cameron@huawei.com>, Will Deacon <will@kernel.org>, Arnaldo Carvalho de Melo <acme@kernel.org>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Ian Rogers <irogers@google.com>, Andi Kleen <ak@linux.intel.com>, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH V5 03/12] perf/x86/intel: Do not enable large PEBS for events with aux actions or aux sampling Date: Thu, 8 Feb 2024 13:31:18 +0200 Message-Id: <20240208113127.22216-4-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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790330252615313910 X-GMAIL-MSGID: 1790330252615313910 |
Series |
perf/core: Add ability for an event to "pause" or "resume" AUX area tracing
|
|
Commit Message
Adrian Hunter
Feb. 8, 2024, 11:31 a.m. UTC
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 <adrian.hunter@intel.com>
---
arch/x86/events/intel/core.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 3804f21ab049..d50f4325d42a 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -3885,6 +3885,12 @@ static inline bool intel_pmu_has_cap(struct perf_event *event, int idx) return test_bit(idx, (unsigned long *)&intel_cap->capabilities); } +static inline bool has_aux_action(struct perf_event *event) +{ + return event->attr.aux_pause || event->attr.aux_resume || + event->attr.aux_sample_size; +} + static int intel_pmu_hw_config(struct perf_event *event) { int ret = x86_pmu_hw_config(event); @@ -3902,8 +3908,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; }