lkml.org 
[lkml]   [2017]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V0 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring support
On Fri, Nov 03, 2017 at 11:00:05AM -0700, Megha Dey wrote:

SNIP

> + event->event_caps |= PERF_EV_CAP_BM;
> + /*
> + * cfg contains one of the 6 possible Branch Monitoring events
> + */
> + cfg = event->attr.config;
> + if (cfg < 0 || cfg > (BM_MAX_EVENTS - 1))
> + return -EINVAL;
> +
> + if (event->attr.sample_period) /* no sampling */
> + return -EINVAL;

you can use the 'is_sampling_event' function

jirka

\
 
 \ /
  Last update: 2017-11-04 14:26    [W:0.074 / U:4.220 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site