All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	Andi Kleen <ak@linux.intel.com>,
	Dapeng Mi <dapeng1.mi@linux.intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Thomas Falcon <thomas.falcon@intel.com>,
	Stephane Eranian <eranian@google.com>,
	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
Date: Wed, 2 Dec 2026 15:13:07 +0100	[thread overview]
Message-ID: <20261202141307.GL2883950@noisy.programming.kicks-ass.net> (raw)
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 <irogers@google.com>
> ---
> 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

  reply	other threads:[~2026-12-02 14:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  6:52 [PATCH v3 1/2] perf/core: Add PERF_EVENT_STATE_ON to fix filtered event enabled time Ian Rogers
2026-11-25  6:52 ` [PATCH v3 2/2] perf test: Add filtered event enabled time tests to event-times Ian Rogers
2026-12-02 14:13   ` Peter Zijlstra [this message]
2026-11-25  7:09 ` [PATCH v3 1/2] perf/core: Add PERF_EVENT_STATE_ON to fix filtered event enabled time sashiko-bot
2026-11-25 12:37 ` Peter Zijlstra
2026-11-25 13:02   ` Peter Zijlstra
2026-11-30 18:42     ` Ian Rogers
2026-12-01  9:18       ` Peter Zijlstra
2026-12-01 16:47         ` Ian Rogers
2026-12-02 10:17           ` Peter Zijlstra
2026-12-02 14:26             ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261202141307.GL2883950@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=thomas.falcon@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.