lkml.org 
[lkml]   [2019]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] perf tools: report initial event parsing error
    On Mon, Nov 11, 2019 at 4:02 AM Jiri Olsa <jolsa@redhat.com> wrote:
    >
    > On Fri, Nov 08, 2019 at 10:15:33AM -0800, Ian Rogers wrote:
    >
    > SNIP
    >
    > > diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
    > > index 43c05eae1768..46a72ecac427 100644
    > > --- a/tools/perf/builtin-trace.c
    > > +++ b/tools/perf/builtin-trace.c
    > > @@ -3016,11 +3016,18 @@ static bool evlist__add_vfs_getname(struct evlist *evlist)
    > > {
    > > bool found = false;
    > > struct evsel *evsel, *tmp;
    > > - struct parse_events_error err = { .idx = 0, };
    > > - int ret = parse_events(evlist, "probe:vfs_getname*", &err);
    > > + struct parse_events_error err;
    > > + int ret;
    > >
    > > - if (ret)
    > > + bzero(&err, sizeof(err));
    >
    > hum, what's the problem with the zero init above?

    There are 3 patterns for initializing parse_events_error in the code,
    bzero, memset and {.idx =0,}. I made all instances use bzero for
    consistency.

    Thanks,
    Ian

    > jirka
    >

    \
     
     \ /
      Last update: 2019-11-16 08:50    [W:3.750 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site