From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=90.155.92.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796220799; b=qlJ7/lTwagE3oSdempr1fW9wiUr372GSGzR6ztlb2Dgl60NIJRdM8Rxcb5YsxOh0ni+J e0Gg5SG51BJFU03NMs9U8/5VSwAza5aLn/ffS44soSv/EmvMQrhky2FnTc1caP3y9MwxR lJPTGBSB0Tneps1d92z/Gt4KflBafS2/d4NOAYs29gePdFRFiJ46meIzy4WjvjNQ8Re6D T+MRaN90hv+tNonqH5XlgNCDE6eYUTAmsP3xgq/2ibcIhuSCMLmCY0HhVvVAqM7ND2B2j yym+UifHw1KQNwGvSuWErMyN6IcmRzyi1R0zqMXy1979hWYr3/6RMBzkP6Lskcv9gqQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796220799; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=ujMNOvt1BE0CjLV3cAmr5UGI5DiBLomoLBSrZtCXbfc=; b=Cp3anBBmAqPi6zgZY1nVE2M143FPeabMxKosCOy3b2Hp+5pP9sXXn3j7QciBqaAnW+Fr QdxuORL+/9RLpygEj/z+w3y0oGC6E95PjR+11ovzwKnFv2X6oPOd/fvMNrP7pqN7vmMUS CPXUoX+lCbr8Nyx5BPlSvrcQ/QrmKE1mkVFoOaO6AhaBqlSl8oomp1oAfjqwVZY0RSCun xdqqwloTdq/0tF1495zP++8AJ6BxcYZ+vv+S73Q6Whgnmgu3d8z8jEGjMguDFP7wShRqL eron5suJ9REaDynl273cK3guqHp6A0rWotpyZnrPIL2W49NTGizmGve2Mw3AqrCKqmw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=REhmzti3; arc=none smtp.remote-ip=90.155.92.199 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A025F606A325; Wed, 2 Dec 2026 14:13:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A025F606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=REhmzti3 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ujMNOvt1BE0CjLV3cAmr5UGI5DiBLomoLBSrZtCXbfc=; b=REhmzti38d8wt+JdJPoi+InwLB aYgNpcHPBanp4iPE7C+qm+2GFBz4EBegjXPtWrPRtJYmJgd9KeWmFV+vMPPvqr/zRZAcC2Z/arFGy hhU0+NWxwvG2TST4L9K7UqUMbChkypBY2p3FTMRU+HaIMLZgO4r4G24jdPC4ExEHMLgotl6lmDEtK xG3qJBX8dL4KH27OYgREnQBpa6pFjLqBJGtjCYyckgNknEQzGvpvn205DqaECimYNkziF59PuwXif NGIMULFhc6DCrOR/2B+EjOVsP1gKLlObqgqY+RWLD1awDasfkKnydN3aHytpECEQmEhAHW0uxjrQo dHOTOpWQ==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYl53-0000000CM3d-0Z2E; Wed, 02 Dec 2026 14:13:14 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id C8DBD300428; Wed, 02 Dec 2026 15:13:07 +0100 (CET) Date: Wed, 2 Dec 2026 15:13:07 +0100 From: Peter Zijlstra To: Ian Rogers Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , James Clark , Andi Kleen , Dapeng Mi , Kan Liang , Thomas Falcon , Stephane Eranian , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] perf test: Add filtered event enabled time tests to event-times Message-ID: <20261202141307.GL2883950@noisy.programming.kicks-ass.net> References: <80d983c5713537f5743b69e9b35ced1177e4732e.1795589380.git.irogers@google.com> <254fb7a2a935c44c62654f3eaefbbc73e23b455b.1795589380.git.irogers@google.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <254fb7a2a935c44c62654f3eaefbbc73e23b455b.1795589380.git.irogers@google.com> On Tue, Nov 24, 2026 at 10:52:29PM -0800, Ian Rogers wrote: > Extend the "Event times" test suite (tools/perf/tests/event-times.c) > with subtests verifying that filtered-out events stay in > PERF_EVENT_STATE_ON and do not accrue bogus total_time_enabled: > > - Task and CPU filtered event times: open a cpu-clock event targeting > both the current thread and one CPU, verifying zero enabled/running > time when enabled on a non-matching CPU (including the mmap userpage), > matching enabled and running times on the target CPU, zero time > accrued after migrating away, and matching times across fork() > inheritance. > - Hybrid PMU filtered event times: on systems with multiple core PMUs > (including >2 core types), iterate all core PMUs and verify per-task > core PMU events accrue zero enabled time while running on CPUs > belonging to any other core PMU. > - Multiplexed and group filtered event times: iterate core PMUs and > verify flexible events and groups in PERF_EVENT_STATE_INACTIVE > (including siblings promoted to group leader on leader close) > transition back to PERF_EVENT_STATE_ON on context switch and accrue > zero enabled time after migrating to a filtered-out CPU. > > Reuse struct affinity from tools/perf/util/affinity.{c,h}, hardening > affinity__setup() to retry on EINVAL for large kernel cpumasks, adding > affinity__has_cpu(), and returning an error status from affinity__set(). > > Signed-off-by: Ian Rogers > --- > v3: > - Try PERF_TYPE_HARDWARE with PERF_COUNT_HW_CPU_CYCLES first on > non-hybrid systems (perf_pmus__num_core_pmus() <= 1) in > open_core_pmu_event() before falling back to raw PMU configs, as > spotted by Sashiko on v2: > https://lore.kernel.org/linux-perf-users/c41f98313862f6545863598dcde871cfb80aba59.1795582691.git.irogers@google.com/ > - Loop over candidate configs in open_core_pmu_event() and iterate all > core PMUs via perf_pmus__scan_core() in the hybrid and multiplexing > subtests to support hybrid machines with >2 CPU types. Can the perf build system please also mention the various NO_foo flags along with the libs it wants that I'm not going to install? I always have to grep for a minute before I can build a new perf :/ Build command of the day ended up being: make NO_SLANG=1 NO_BPF=1 NO_PYTHON_MODULE=1 NO_JEVENTS=1