Re: [PATCH 35/63] perf trace: Allow specifying a set of events to add in perfconfig

Arnaldo Carvalho de Melo
2018-12-19T12:50:05Z

Em Wed, Dec 19, 2018 at 05:40:24PM +0900, Namhyung Kim escreveu:
> On Tue, Dec 18, 2018 at 07:07:05PM -0300, Arnaldo Carvalho de Melo wrote:
> > + if (!strcmp(var, "trace.add_events")) {
> > + struct trace *trace = arg;
> > + struct option o = OPT_CALLBACK('e', "event", &trace->evlist, "event",
> > + "event selector. use 'perf list' to list available events",
> > + parse_events_option);
> > + err = parse_events_option(&o, value, 0);

> It's a bit strange to use parse_events_option() here IMHO. Why not
> using parse_events() instead?

I just reused what was done a in another place in 'perf trace', will
check and use parse_events() directly, thanks for the suggestion!

- Arnaldo