Re: [PATCH v9 12/14] x86: perf: intel_pt: Intel PT PMU driver
From: Peter Zijlstra
Date: Thu Jan 15 2015 - 04:07:22 EST
On Wed, Jan 14, 2015 at 02:18:21PM +0200, Alexander Shishkin wrote:
> +static __init int pt_init(void)
> +{
> + pt_pmu.pmu.attr_groups = pt_attr_groups;
> + pt_pmu.pmu.task_ctx_nr = perf_hw_context;
I just noticed this one, how can this ever work? We want the PT thing to
always get programmed, right? -- because we disallow creating more than
1?
Which reminds me; does that exclusive thing you did not allow you to
create one cpu wide and one per task (they're separate contexts) events?
At which point we're not schedulable at all.
By sticking it on the HW context list it can end up not being programed
because its stuck after a bunch of hardware events that don't all fit on
the PMU.
Would not the SW list be more appropriate; the SW list is a list of
events that's guaranteed to be schedulable.
> + pt_pmu.pmu.event_init = pt_event_init;
> + pt_pmu.pmu.add = pt_event_add;
> + pt_pmu.pmu.del = pt_event_del;
> + pt_pmu.pmu.start = pt_event_start;
> + pt_pmu.pmu.stop = pt_event_stop;
> + pt_pmu.pmu.read = pt_event_read;
> + pt_pmu.pmu.setup_aux = pt_buffer_setup_aux;
> + pt_pmu.pmu.free_aux = pt_buffer_free_aux;
> + ret = perf_pmu_register(&pt_pmu.pmu, "intel_pt", -1);
> +
> + return ret;
> +}
--
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/