lkml.org 
[lkml]   [2015]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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;




    \
     
     \ /
      Last update: 2015-10-23 07:41    [W:4.496 / U:0.304 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site