Re: [PATCH 03/22] perf/x86/intel: Support adaptive PEBSv4

From: Peter Zijlstra
Date: Wed Mar 20 2019 - 11:58:24 EST


On Tue, Mar 19, 2019 at 02:38:24PM -0700, Andi Kleen wrote:
> > How much work would intel_pmu_drain_pebs_icl() be?
> >
> > I'm thinking that might not be terrible.
>
> I had it in an early version of the code, but it ended up with a lot
> of code duplication.

I'm thinking that if you remove all the <v3 nonsense, it shouldn't be
_that_ much. A quick hack here makes it ~60 lines.

And it avoids sprinkling a whole bunch of conditionals around and
introducing that new x86_pmu method.