Re: [PATCH] perf tools: report initial event parsing error
From: Jiri Olsa
Date: Mon Nov 11 2019 - 07:02:34 EST
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?
jirka