Re: [PATCH 0/8] perf/x86: Rework msr probe interface

From: Peter Zijlstra
Date: Tue May 28 2019 - 06:05:24 EST


On Mon, May 27, 2019 at 11:51:21PM +0200, Jiri Olsa wrote:
> hi,
> following up on [1], [2] and [3], this patchset adds update
> attribute groups to pmu, factors out the MSR probe code and
> use it in msr,cstate* and rapl PMUs.
>
> The functionality stays the same with one exception:
> the event is not exported if the rdmsr return zero
> on event's msr.

That seems a wee bit dangerous, are we sure none of these counters are 0
by 'accident' when we probe them? I'm thinking esp. things like the Cn
residency stuff could be 0 simply because we've not been into that state
yet.

Other than that, this looks good. Kan?