Re: [PATCH V0 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux