Re: [PATCH v1] perf test switch-tracking: Fix hybrid cpu-cycles and spin timing

From: Namhyung Kim

Date: Sat Nov 14 2026 - 23:13:17 EST


On Sun, 25 Oct 2026 14:50:56 -0700, Ian Rogers wrote:
> On hybrid systems, parse_event(evlist, "cpu-cycles:u") creates multiple
> evsels (e.g. cpu_atom/cpu-cycles/ and cpu_core/cpu-cycles/), but
> test__switch_tracking() only configured, enabled/disabled, and checked
> evlist__last(evlist). If the test process ran on another core PMU during
> one of the spin phases, the tracked evsel recorded no samples and the
> test failed with 'Missing cycles events'. Additionally, the other core
> PMU evsels did not have PERF_SAMPLE_TIME set, which add_event() missed
> because __evsel__parse_sample() initializes sample.time to -1ULL rather
> than 0.
>
> [...]

Applied to perf-tools-next, thanks!

Best regards
Namhyung