perf tools: Introduce opt_event_config nonterminal
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 19 Feb 2016 21:45:12 +0000 (18:45 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 19 Feb 2016 22:12:50 +0000 (19:12 -0300)
commit1d55e8ef340dad1ccd5aaf53071de41fc3d8dba4
tree6c7e4c8bd38dafb6648f30fcbeae8ed70a07dd60
parente814fddde18fec43fa41a27ae94c09b54772697e
perf tools: Introduce opt_event_config nonterminal

To remove duplicated code that differs only in using the matching
'/a,b,c/' part or NULL if no event configuration is done ('//' or no
pair of slashes at all).

Will be used by some new targets allowing the configuration of hardware
events, etc.

Lifted part of the 'opt_event_config' nonterminal from a patch by Wang
Nan.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Cody P Schafer <dev@codyps.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jeremie Galarneau <jeremie.galarneau@efficios.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kirill Smelkov <kirr@nexedi.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/n/tip-e3xzpx9cqsmwnaguaxyw6r42@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.y