Re: [RFC] x86, perf: Add an aperfmperf driver
From: Peter Zijlstra
Date: Wed Apr 29 2015 - 05:15:24 EST
On Tue, Apr 28, 2015 at 02:25:37PM -0700, Andy Lutomirski wrote:
> +static struct pmu pmu_aperfmperf = {
> + .task_ctx_nr = perf_invalid_context,
You could actually have made that perf_sw_context, because its
impossible to fail to add() this event. That will make it possible to
attach it to tasks and you can measure per task a/m-perf.
> + .attr_groups = attr_groups,
> + .event_init = aperfmperf_event_init,
> + .add = aperfmperf_event_add,
> + .del = aperfmperf_event_stop_or_del,
> + .start = aperfmperf_event_start,
> + .stop = aperfmperf_event_stop_or_del,
> + .read = aperfmperf_event_update,
> +};
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/