Messages in this thread | | | Date | Wed, 29 Apr 2015 11:14:50 +0200 | From | Peter Zijlstra <> | Subject | Re: [RFC] x86, perf: Add an aperfmperf driver |
| |
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, > +};
| |