[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190321210942.GA7905@worktop.programming.kicks-ass.net>
Date: Thu, 21 Mar 2019 22:09:42 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: 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 V2 06/23] perf/x86: Support constraint ranges
On Thu, Mar 21, 2019 at 01:56:46PM -0700, kan.liang@...ux.intel.com wrote:
> From: Andi Kleen <ak@...ux.intel.com>
That might be a stretch at this point...
> @@ -263,18 +268,25 @@ struct cpu_hw_events {
> void *kfree_on_online[X86_PERF_KFREE_MAX];
> };
>
> -#define __EVENT_CONSTRAINT(c, n, m, w, o, f) {\
> +#define __EVENT_CONSTRAINT_RANGE(c, e, n, m, w, o, f) { \
> { .idxmsk64 = (n) }, \
> .code = (c), \
> + .size = (e) - (c), \
> .cmask = (m), \
> .weight = (w), \
> .overlap = (o), \
> .flags = f, \
> }
>
> +#define __EVENT_CONSTRAINT(c, n, m, w, o, f) \
> + __EVENT_CONSTRAINT_RANGE(c, c, n, m, w, o, f)
> +
> #define EVENT_CONSTRAINT(c, n, m) \
> __EVENT_CONSTRAINT(c, n, m, HWEIGHT(n), 0, 0)
>
> +#define EVENT_CONSTRAINT_RANGE(c, e, n, m) \
> + __EVENT_CONSTRAINT_RANGE(c, e, n, m, HWEIGHT(n), 0, 0)
> +
^ that one needs a comment that it doesn't work for AMD events.
> #define INTEL_EXCLEVT_CONSTRAINT(c, n) \
> __EVENT_CONSTRAINT(c, n, ARCH_PERFMON_EVENTSEL_EVENT, HWEIGHT(n),\
> 0, PERF_X86_EVENT_EXCL)
Powered by blists - more mailing lists