Re: [patch 2/4] x86/perf/intel/cstate: Sanitize probing

From: Thomas Gleixner
Date: Mon Mar 21 2016 - 11:06:21 EST


On Mon, 21 Mar 2016, Thomas Gleixner wrote:

> On Mon, 21 Mar 2016, Peter Zijlstra wrote:
>
> > On Mon, Mar 21, 2016 at 02:19:27PM +0000, Liang, Kan wrote:
> >
> > > > - /* Probe the cstate events. */
> > > > - for (i = 0; i < max_event_nr; i++) {
> > > > - if (!msr[i].test(i) || rdmsrl_safe(msr[i].msr, &val))
> > > > - msr[i].attr = NULL;
> > > > - }
> > >
> > > I think we need to update msr[i].attr as well.
> > > Because in cstate_pmu_event_init we still need it to do check.
> >
> > Yeah, this is exploding on all sides..
>
> Gah crap. Why did this not explode in my face? Delta patch below.

Duh, ignore it. Brain not working.