lkml.org 
[lkml]   [2011]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: perf tools: interface for improved PEBS ABI can accept wrong parameter
From
Date
On Tue, 2011-10-18 at 20:19 +0200, Ingo Molnar wrote:
> > +#define SAMPLE_IP_MAX 3
> > precise_ip : 2, /* skid constraint */
> > mmap_data : 1, /* non-exec mmap data */
> > sample_id_all : 1, /* sample_type all events */
> > diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
> > index 928918b..a2068cc 100644
> > --- a/tools/perf/util/parse-events.c
> > +++ b/tools/perf/util/parse-events.c
> > @@ -775,7 +775,10 @@ parse_event_modifier(const char **strp, struct perf_event_attr *attr)
> > attr->exclude_user = eu;
> > attr->exclude_kernel = ek;
> > attr->exclude_hv = eh;
> > - attr->precise_ip = precise;
> > + if ( precise < SAMPLE_IP_MAX )
> > + attr->precise_ip = precise;
> > + else
> > + return -1;

That name is horrid, how about PRECISE_IP_MAX? Also, I suspect acme will
want a better error return than -1, but I'll leave that up to him.


\
 
 \ /
  Last update: 2011-10-18 20:31    [W:0.064 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site