2017-11-11 00:45:30

by Megha Dey

[permalink] [raw]
Subject: RE: [PATCH V0 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring support



>-----Original Message-----
>From: Jiri Olsa [mailto:[email protected]]
>Sent: Saturday, November 4, 2017 6:25 AM
>To: Megha Dey <[email protected]>
>Cc: [email protected]; [email protected]; linux-
>[email protected]; [email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]; Yu, Yu-cheng <[email protected]>;
>Brown, Len <[email protected]>; [email protected];
>[email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]; [email protected];
>[email protected]; [email protected]; Andrejczuk, Grzegorz
><[email protected]>; Luck, Tony <[email protected]>;
>[email protected]; Shankar, Ravi V <[email protected]>; Dey, Megha
><[email protected]>
>Subject: Re: [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

Will make the change.
>
>jirka

From 1583728267994507590@xxx Sat Nov 11 00:42:53 +0000 2017
X-GM-THRID: 1583067906559816766
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread