[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fUyVyg888bB-4K3o73kQbqo=G=8T9OFy0C=qtWTJjCOrw@mail.gmail.com>
Date: Fri, 15 Nov 2019 23:49:10 -0800
From: Ian Rogers <irogers@...gle.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Ravi Bangoria <ravi.bangoria@...ux.ibm.com>,
Anju T Sudhakar <anju@...ux.vnet.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Thomas Richter <tmricht@...ux.ibm.com>,
Andi Kleen <ak@...ux.intel.com>,
Jin Yao <yao.jin@...ux.intel.com>,
Allison Randal <allison@...utok.net>,
Davidlohr Bueso <dave@...olabs.net>,
Thomas Gleixner <tglx@...utronix.de>,
Adrian Hunter <adrian.hunter@...el.com>,
LKML <linux-kernel@...r.kernel.org>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf tools: report initial event parsing error
On Mon, Nov 11, 2019 at 4:02 AM Jiri Olsa <jolsa@...hat.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
>
Powered by blists - more mailing lists