[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190529075814.GC2623@hirez.programming.kicks-ass.net>
Date: Wed, 29 May 2019 09:58:14 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: acme@...nel.org, mingo@...hat.com, linux-kernel@...r.kernel.org,
tglx@...utronix.de, jolsa@...nel.org, eranian@...gle.com,
alexander.shishkin@...ux.intel.com, ak@...ux.intel.com
Subject: Re: [PATCH 7/9] perf/x86/intel: Disable sampling read slots and
topdown
On Tue, May 28, 2019 at 02:25:34PM -0400, Liang, Kan wrote:
> > > +static int icl_validate_group(struct cpu_hw_events *cpuc, int n)
> > > +{
> > > + bool has_sampling_slots = false, has_metrics = false;
> > > + struct perf_event *e;
> > > + int i;
> > > +
> > > + for (i = 0; i < n; i++) {
> > > + e = cpuc->event_list[i];
> > > + if (is_slots_event(e) && is_sampling_event(e))
> > > + has_sampling_slots = true;
> > > +
> > > + if (is_perf_metrics_event(e))
> > > + has_metrics = true;
> > > + }
> > > + if (unlikely(has_sampling_slots && has_metrics))
> > > + return -EINVAL;
> > > + return 0;
> > > +}
> >
> > Why this special hack, why not disallow sampling on SLOTS on creation?
>
> You mean unconditionally disable SLOTS sampling?
>
> The SLOTS doesn't have to be with Topdown metrics event.
> I think users may want to only sampling slot events. We should allow this
> usage.
Given the trainwreck these patches are, none of that is clear.
Powered by blists - more mailing lists