mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: kan.liang@intel.com
Cc: acme@kernel.org, linux-kernel@vger.kernel.org, ak@linux.intel.com
Subject: Re: [PATCH v4 3/3] perf tools: Add support to new style format of kernel PMU event
Date: Sat, 6 Sep 2014 21:39:09 +0200	[thread overview]
Message-ID: <20140906193909.GE6059@krava.brq.redhat.com> (raw)
In-Reply-To: <1409671770-17260-3-git-send-email-kan.liang@intel.com>

On Tue, Sep 02, 2014 at 11:29:30AM -0400, kan.liang@intel.com 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

  reply	other threads:[~2014-09-06 19:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 15:29 [PATCH v4 1/3] Revert "perf tools: Default to cpu// for events v5" kan.liang
2014-09-02 15:29 ` [PATCH v4 2/3] perf tools: parse the pmu event prefix and surfix kan.liang
2014-09-06 19:38   ` Jiri Olsa
2014-09-06 19:39   ` Jiri Olsa
2014-09-02 15:29 ` [PATCH v4 3/3] perf tools: Add support to new style format of kernel PMU event kan.liang
2014-09-06 19:39   ` Jiri Olsa [this message]
2014-09-06 19:39   ` Jiri Olsa
2014-09-08 15:09     ` Liang, Kan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140906193909.GE6059@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®