Alexey Budankov <alexey.budan...@linux.intel.com> writes: > Since it reduces to single cpu context (and single task context) at all > times, > ideally, it would probably be coded as simple as this: > > perf_rotate_context() > { > cpu = this_cpu_ptr(&cpu_context) > for_every_pmu(pmu, cpu) > for_every_event_ctx(event_ctx, pmu) > rotate(event_ctx, pmu) > } > > so rotate(event_ctx, pmu) would operate on common events objects semantics > and memory layout, and PMU specific code handle SW/HW programming differences.
Ok, what's event_ctx and how does that simplify things? Regards, -- Alex