lkml.org 
[lkml]   [2019]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 06/23] perf/x86: Support constraint ranges
On Thu, Mar 21, 2019 at 01:56:46PM -0700, kan.liang@linux.intel.com wrote:
> From: Andi Kleen <ak@linux.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)

\
 
 \ /
  Last update: 2019-03-21 22:10    [W:0.090 / U:24.516 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site