Messages in this thread | | | Date | Fri, 23 Oct 2015 12:48:41 +0800 | From | "Wangnan (F)" <> | Subject | Re: [RFC PATCH 4/7] perf tools: Enable BPF object configure syntax |
| |
On 2015/10/17 18:48, Wang Nan wrote:
[SNIP] > > event_bpf_file: > -PE_BPF_OBJECT > +PE_BPF_OBJECT event_bpf_config > { > struct parse_events_evlist *data = _data; > struct parse_events_error *error = data->error; > struct list_head *list; > > ALLOC_LIST(list); > - ABORT_ON(parse_events_load_bpf(data, list, $1, false)); > + ABORT_ON(parse_events_load_bpf(data, list, $1, false, $2)); > + parse_events__free_terms($2);
Here found a bug that $2 is possible to be NULL, but parse_events_free_terms can't accept NULL param.
Will be fixed in next version.
Thank you.
> $$ = list; > } > | > -PE_BPF_SOURCE > +PE_BPF_SOURCE event_bpf_config > { > struct parse_events_evlist *data = _data; > struct list_head *list; > > ALLOC_LIST(list); > - ABORT_ON(parse_events_load_bpf(data, list, $1, true)); > + ABORT_ON(parse_events_load_bpf(data, list, $1, true, $2)); > + parse_events__free_terms($2); > $$ = list; > } > > +event_bpf_config: > +'/' event_config '/' > +{ > + $$ = $2; > +} > +| > +{ > + $$ = NULL; > +} > + > start_terms: event_config > { > struct parse_events_terms *data = _data;
| |