On Tue, Sep 02, 2014 at 11:29:30AM -0400, [email protected] wrote:

SNIP

> +++ b/tools/perf/util/parse-events.y
> @@ -47,6 +47,7 @@ static inc_group_count(struct list_head *list,
>  %token PE_NAME_CACHE_TYPE PE_NAME_CACHE_OP_RESULT
>  %token PE_PREFIX_MEM PE_PREFIX_RAW PE_PREFIX_GROUP
>  %token PE_ERROR
> +%token PE_PMU_EVENT_PRE PE_PMU_EVENT_SUF PE_KERNEL_PMU_EVENT
>  %type <num> PE_VALUE
>  %type <num> PE_VALUE_SYM_HW
>  %type <num> PE_VALUE_SYM_SW
> @@ -58,6 +59,7 @@ static inc_group_count(struct list_head *list,
>  %type <str> PE_MODIFIER_EVENT
>  %type <str> PE_MODIFIER_BP
>  %type <str> PE_EVENT_NAME
> +%type <str> PE_PMU_EVENT_PRE PE_PMU_EVENT_SUF PE_KERNEL_PMU_EVENT
>  %type <num> value_sym
>  %type <head> event_config
>  %type <term> event_term
> @@ -210,6 +212,46 @@ PE_NAME '/' event_config '/'
>       parse_events__free_terms($3);
>       $$ = list;
>  }
> +|
> +PE_KERNEL_PMU_EVENT
> +{
> +     struct parse_events_evlist *data = _data;
> +     struct list_head *head = malloc(sizeof(*head));

could you please use ALLOC_LIST(head) ?

> +     struct parse_events_term *term;
> +     struct list_head *list;
> +
> +     ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER,
> +                                     $1, 1));
> +     ABORT_ON(!head);
> +     INIT_LIST_HEAD(head);
> +     list_add_tail(&term->list, head);
> +
> +     ALLOC_LIST(list);
> +     ABORT_ON(parse_events_add_pmu(list, &data->idx, "cpu", head));
> +     parse_events__free_terms(head);
> +     $$ = list;
> +}
> +|
> +PE_PMU_EVENT_PRE '-' PE_PMU_EVENT_SUF
> +{
> +     struct parse_events_evlist *data = _data;
> +     struct list_head *head = malloc(sizeof(*head));

same here

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to