Re: [PATCH] perf tools: report initial event parsing error

Jiri Olsa
2019-11-11T12:02:35Z

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