lkml.org 
[lkml]   [2015]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 12/14] x86: perf: intel_pt: Intel PT PMU driver
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;
> +}


\
 
 \ /
  Last update: 2015-01-15 10:21    [W:0.196 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site