Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-21 Thread Jiri Olsa
On Tue, Nov 21, 2017 at 04:30:09PM +0800, zhangmengting wrote: SNIP > > > > also I think the precise level is not generic for all the events, > > > > so you should check it for specific perf_event_attr later, when > > > > the attr is ready, not in modifier parsing > > > You are right, and I

Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-21 Thread Jiri Olsa
On Tue, Nov 21, 2017 at 04:30:09PM +0800, zhangmengting wrote: SNIP > > > > also I think the precise level is not generic for all the events, > > > > so you should check it for specific perf_event_attr later, when > > > > the attr is ready, not in modifier parsing > > > You are right, and I

Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-21 Thread zhangmengting
On 2017/11/20 15:33, Jiri Olsa wrote: On Wed, Nov 15, 2017 at 09:00:03AM +0800, zhangmengting wrote: Hi Jiri, thanks for your detailed review, please see my comments inline. On 2017/11/10 18:39, Jiri Olsa wrote: On Fri, Nov 10, 2017 at 04:28:37PM +0800, Mengting Zhang wrote: SNIP diff

Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-21 Thread zhangmengting
On 2017/11/20 15:33, Jiri Olsa wrote: On Wed, Nov 15, 2017 at 09:00:03AM +0800, zhangmengting wrote: Hi Jiri, thanks for your detailed review, please see my comments inline. On 2017/11/10 18:39, Jiri Olsa wrote: On Fri, Nov 10, 2017 at 04:28:37PM +0800, Mengting Zhang wrote: SNIP diff

Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-19 Thread Jiri Olsa
On Wed, Nov 15, 2017 at 09:00:03AM +0800, zhangmengting wrote: > Hi Jiri, thanks for your detailed review, please see my comments inline. > > > On 2017/11/10 18:39, Jiri Olsa wrote: > > On Fri, Nov 10, 2017 at 04:28:37PM +0800, Mengting Zhang wrote: > > > > SNIP > > > > > diff --git

Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-19 Thread Jiri Olsa
On Wed, Nov 15, 2017 at 09:00:03AM +0800, zhangmengting wrote: > Hi Jiri, thanks for your detailed review, please see my comments inline. > > > On 2017/11/10 18:39, Jiri Olsa wrote: > > On Fri, Nov 10, 2017 at 04:28:37PM +0800, Mengting Zhang wrote: > > > > SNIP > > > > > diff --git

Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-14 Thread zhangmengting
Hi Jiri, thanks for your detailed review, please see my comments inline. On 2017/11/10 18:39, Jiri Olsa wrote: On Fri, Nov 10, 2017 at 04:28:37PM +0800, Mengting Zhang wrote: SNIP diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 39b1596..25225f4 100644 ---

Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-14 Thread zhangmengting
Hi Jiri, thanks for your detailed review, please see my comments inline. On 2017/11/10 18:39, Jiri Olsa wrote: On Fri, Nov 10, 2017 at 04:28:37PM +0800, Mengting Zhang wrote: SNIP diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 39b1596..25225f4 100644 ---

Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-10 Thread Jiri Olsa
On Fri, Nov 10, 2017 at 04:28:37PM +0800, Mengting Zhang wrote: SNIP > diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c > index 39b1596..25225f4 100644 > --- a/tools/perf/util/parse-events.c > +++ b/tools/perf/util/parse-events.c > @@ -1369,6 +1369,32 @@ struct

Re: [PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-10 Thread Jiri Olsa
On Fri, Nov 10, 2017 at 04:28:37PM +0800, Mengting Zhang wrote: SNIP > diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c > index 39b1596..25225f4 100644 > --- a/tools/perf/util/parse-events.c > +++ b/tools/perf/util/parse-events.c > @@ -1369,6 +1369,32 @@ struct

[PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-10 Thread Mengting Zhang
When the user set a precise_ip greater than the highest precision available, perf should return EINVAL to indicate the invalid precise_ip setting. Currently, in get_event_modifier(), perf compares the user-specified precise_ip with 3, instead of the highest precision available in the current

[PATCH] perf parse events: Fix invalid precise_ip handling

2017-11-10 Thread Mengting Zhang
When the user set a precise_ip greater than the highest precision available, perf should return EINVAL to indicate the invalid precise_ip setting. Currently, in get_event_modifier(), perf compares the user-specified precise_ip with 3, instead of the highest precision available in the current