[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 11 Nov 2017 00:44:36 +0000
From: "Dey, Megha" <megha.dey@...el.com>
To: Jiri Olsa <jolsa@...hat.com>, Megha Dey <megha.dey@...ux.intel.com>
CC: "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>,
"andriy.shevchenko@...ux.intel.com"
<andriy.shevchenko@...ux.intel.com>,
"kstewart@...uxfoundation.org" <kstewart@...uxfoundation.org>,
"Yu, Yu-cheng" <yu-cheng.yu@...el.com>,
"Brown, Len" <len.brown@...el.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"acme@...nel.org" <acme@...nel.org>,
"alexander.shishkin@...ux.intel.com"
<alexander.shishkin@...ux.intel.com>,
"namhyung@...nel.org" <namhyung@...nel.org>,
"vikas.shivappa@...ux.intel.com" <vikas.shivappa@...ux.intel.com>,
"pombredanne@...b.com" <pombredanne@...b.com>,
"me@...ehuey.com" <me@...ehuey.com>, "bp@...e.de" <bp@...e.de>,
"Andrejczuk, Grzegorz" <grzegorz.andrejczuk@...el.com>,
"Luck, Tony" <tony.luck@...el.com>,
"corbet@....net" <corbet@....net>,
"Shankar, Ravi V" <ravi.v.shankar@...el.com>
Subject: RE: [PATCH V0 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring
support
>-----Original Message-----
>From: Jiri Olsa [mailto:jolsa@...hat.com]
>Sent: Saturday, November 4, 2017 6:25 AM
>To: Megha Dey <megha.dey@...ux.intel.com>
>Cc: x86@...nel.org; linux-kernel@...r.kernel.org; linux-
>doc@...r.kernel.org; tglx@...utronix.de; mingo@...hat.com;
>hpa@...or.com; andriy.shevchenko@...ux.intel.com;
>kstewart@...uxfoundation.org; Yu, Yu-cheng <yu-cheng.yu@...el.com>;
>Brown, Len <len.brown@...el.com>; gregkh@...uxfoundation.org;
>peterz@...radead.org; acme@...nel.org;
>alexander.shishkin@...ux.intel.com; namhyung@...nel.org;
>vikas.shivappa@...ux.intel.com; pombredanne@...b.com;
>me@...ehuey.com; bp@...e.de; Andrejczuk, Grzegorz
><grzegorz.andrejczuk@...el.com>; Luck, Tony <tony.luck@...el.com>;
>corbet@....net; Shankar, Ravi V <ravi.v.shankar@...el.com>; Dey, Megha
><megha.dey@...el.com>
>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
Powered by blists - more mailing lists