Messages in this thread | | | Date | Wed, 20 May 2020 10:32:34 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH] perf stat: Fail on extra comma while parsing events |
| |
Em Wed, May 20, 2020 at 12:51:24AM -0700, Ian Rogers escreveu: > On Wed, May 20, 2020 at 12:41 AM Jiri Olsa <jolsa@kernel.org> wrote: > > > > Ian reported that we allow to parse following: > > > > $ perf stat -e ,cycles true > > > > which is wrong and we should fail, like we do with this fix: > > > > $ perf stat -e ,cycles true > > event syntax error: ',cycles' > > \___ parser error > > > > The reason is that we don't have rule for ',' in 'event' > > start condition and it's matched and accepted by default > > rule. > > > > Adding scanner debug support (that Ian already added for > > expr code), which was really useful for finding this. It's > > enabled together with bison debug via 'make PARSER_DEBUG=1'. > > > > Reported-by: Ian Rogers <irogers@google.com> > > Signed-off-by: Jiri Olsa <jolsa@kernel.org> > > Acked-by: Ian Rogers <irogers@google.com>
Thanks, applied.
- Arnaldo
| |