From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=90.155.50.34 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796284441; b=L0sThtlHp7DN3WvJ5t8uGnJvtKpVol6knhP3sDtinLruHK0+TNehJBuZl6Y3S2rv0ZbX MTEr1Q2GcygbFhiAbOppqcrJgJFJr89PAhw7x+iKKCYxTuMOzC0psgw8FiT+9UBD5v1qt s1ojVJmb3OLhPWLksKqnzbUvidBx9pR8JorTmvKrsCF5E2ijz8pYZeeZ5Ap/lL+im6DSk QKKyet8sZsoah8iuSsUU5L+JMNJaVkqPDiyInJGhI0PUGmxLODjbYDf/REHhJ+644Gz0U 1CmANq0mcvrjFTLxMwyoGUjiUcTTtAyMRhdwSIgMhhrQLM2W7TD16sdnRX4zpT4RGBQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796284441; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; bh=D8wQDwvrSJ5uPX9Ji3AYFptV3ohe5ZL1VpUlABQjjOA=; b=DVZNYj1ixR93gVbTpPIoDG6LzqsUsZY65RxTGpaIMbASumOIVEEQEOs5P9oA2PGWRBm7 qeL44Y7oaVfuVnxGoRACEnzbHsfhRmvVZVhd+V1ym7ZbkjPv/m74S97LiCJ4Y2qkbNuM8 DMY1zTa7Y/pft6O5LW0sXoFCufvh/vPVAmDGLlNnDJpkITg6zoEFegzzDNAbptF2KKO4N +xPk+betJ/eaxZm0C8J4yK/BK5vkvsKtXc8aG48Sij1wXbaF4Psjr4TxTbbdKUXEVbMFp +Org9kQsSCgfY1qTEacyUrLhJky3XxrXVJJ1k4iEMsNsgE/OdYaKpsearrlWXQMqRWQ== 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=casper.20170209 header.b=h8FGXmhY; arc=none smtp.remote-ip=90.155.50.34 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 68C03606A322; Thu, 3 Dec 2026 07:54:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 68C03606A322 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=casper.20170209 header.b=h8FGXmhY DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=D8wQDwvrSJ5uPX9Ji3AYFptV3ohe5ZL1VpUlABQjjOA=; b=h8FGXmhYw7cAkE/gw4yNua5Nic SmW0wWIu3woFhard99imijXaELBtYVPYKjJ6ugkLHKv+zJbE42zhjGs7gDIHAlNHjgjnYmtlYOfwG jW2dEok7tONfpBKmwE6+pxkV3izCJjVFzc4C+N0pyO+wVJrglZgVLVOJS09c2ATDWp5nBlqfu99uH DlW0bWi1jCtxFI9Ot+xtwlpWqy3G0D0FrNXB4Rb3PQ0BXjuilz2vnqOUM3LvaQfXH/acxTmATNXi8 m8a69X+Ky2gYkHSTK1xtIeET5F2DyXYCzTtyT0MLktMumlIFemljbDJWcxHMSXrsxNx+ubMlJcn3V itfODGnA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ1dZ-0000000F2HK-1tWF; Thu, 03 Dec 2026 07:53:53 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 625C830120E; Thu, 03 Dec 2026 08:53:52 +0100 (CET) Date: Thu, 3 Dec 2026 08:53:52 +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: <20261203075352.GM2883950@noisy.programming.kicks-ass.net> References: <80d983c5713537f5743b69e9b35ced1177e4732e.1795589380.git.irogers@google.com> <254fb7a2a935c44c62654f3eaefbbc73e23b455b.1795589380.git.irogers@google.com> <20261202141307.GL2883950@noisy.programming.kicks-ass.net> X-Mailing-List: linux-perf-users@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Dec 02, 2026 at 10:35:04AM -0800, Ian Rogers wrote: > On Wed, Dec 2, 2026 at 6:13 AM Peter Zijlstra wrote: > > > > 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 > > Sure, I'll put together a patch for tools/perf/Makefile.config so the > missing-library warnings/errors also mention the corresponding NO_* / > BUILD_* flags (they're documented at the top of Makefile.perf, but > having them right in the message avoids grepping). > > As a quick note: NO_SLANG, NO_PYTHON_MODULE (when Python/Python.h is > missing), and NO_LIBBPF / BUILD_BPF_SKEL=0 (there isn't actually a > NO_BPF flag) are supposed to auto-disable with a warning rather than > failing the build — only NO_LIBELF=1, NO_LIBTRACEEVENT=1, NO_JEVENTS=1 > (missing/old Python), and Python < 3.9 for NO_PYTHON_MODULE=1 should be > hard errors. If any of those actually failed the build rather than just > warning, let me know which error you hit so I can fix the auto-detection > too. Ah, so when I do 'make', I get the following: BUILD: Doing 'make -j40' parallel build Makefile.config:576: No elfutils/debuginfod.h found, no debuginfo server support, please install libdebuginfod-dev/elfutils-debuginfod-client-devel or equivalent Makefile.config:617: No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:640: BPF API too old. Please install recent kernel headers. BPF support in 'perf record' is disabled. Makefile.config:664: Warning: Disabled BPF skeletons as libbpf is required Makefile.config:778: slang not found, disables TUI support. Please install slang-devel, libslang-dev or libslang2-dev Makefile.config:835: No python interpreter was found: disables Python support - please install python-devel/python-dev Makefile.config:883: *** ERROR: No python interpreter needed for jevents generation. Install python or build with NO_JEVENTS=1.. Stop. make[1]: *** [Makefile.perf:343: sub-make] Error 2 And I just started disabling stuff from the top down until it worked. When reading more carefully I now see the python thing is indeed the hard error and it does mention the NO_JEVENTS=1 thing. That alone is indeed sufficient to build. So perhaps I just need to read better.