linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jolsa@redhat.com (Jiri Olsa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration
Date: Thu, 21 Jul 2016 09:47:22 +0200	[thread overview]
Message-ID: <20160721074722.GB7192@krava> (raw)
In-Reply-To: <1469047100-18131-4-git-send-email-mathieu.poirier@linaro.org>

On Wed, Jul 20, 2016 at 02:38:17PM -0600, Mathieu Poirier wrote:

SNIP

> diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
> index d1edbf8cc66a..8d09a976fca8 100644
> --- a/tools/perf/util/parse-events.h
> +++ b/tools/perf/util/parse-events.h
> @@ -71,6 +71,7 @@ enum {
>  	PARSE_EVENTS__TERM_TYPE_MAX_STACK,
>  	PARSE_EVENTS__TERM_TYPE_NOOVERWRITE,
>  	PARSE_EVENTS__TERM_TYPE_OVERWRITE,
> +	PARSE_EVENTS__TERM_TYPE_DRV_CFG,
>  	__PARSE_EVENTS__TERM_TYPE_NR,
>  };
>  
> diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> index 7a2519435da0..1f7e11a6c5b3 100644
> --- a/tools/perf/util/parse-events.l
> +++ b/tools/perf/util/parse-events.l
> @@ -53,6 +53,16 @@ static int str(yyscan_t scanner, int token)
>  	return token;
>  }
>  
> +static int drv_str(yyscan_t scanner, int token)
> +{
> +	YYSTYPE *yylval = parse_events_get_lval(scanner);
> +	char *text = parse_events_get_text(scanner);
> +
> +	/* Strip off the '@' */
> +	yylval->str = strdup(text + 1);
> +	return token;
> +}

why don't let bison parse this with rule like:

| '@' PE_DRV_CFG_TERM
{
...
}


you could omit the drv_str function then

thanks,
jirka

  parent reply	other threads:[~2016-07-21  7:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 20:38 [PATCH V2 0/6] perf: Driver specific configuration for PMU Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 1/6] perf/core: Adding PMU driver specific configuration Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 2/6] perf: Passing struct perf_event to function setup_aux() Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration Mathieu Poirier
2016-07-21  7:47   ` Jiri Olsa
2016-07-21  7:47   ` Jiri Olsa [this message]
2016-07-21 14:44     ` Mathieu Poirier
2016-07-21 14:54       ` Jiri Olsa
2016-07-21 15:47         ` Mathieu Poirier
2016-07-22 18:24         ` Mathieu Poirier
2016-07-26 20:41           ` Jiri Olsa
2016-07-27 17:59             ` Mathieu Poirier
2016-07-27 19:26               ` Jiri Olsa
2016-07-28 16:15                 ` Mathieu Poirier
2016-07-28 16:52                   ` Jiri Olsa
2016-07-21  7:47   ` Jiri Olsa
2016-07-20 20:38 ` [PATCH V2 4/6] perf tools: pushing driver configuration down to the kernel Mathieu Poirier
2016-07-21  7:47   ` Jiri Olsa
2016-07-22 19:57     ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 5/6] coresight: adding sink parameter to function coresight_build_path() Mathieu Poirier
2016-07-21 10:49   ` Suzuki K Poulose
2016-07-21 15:05     ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 6/6] coresight: etm-perf: incorporating sink definition from cmd line Mathieu Poirier

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=20160721074722.GB7192@krava \
    --to=jolsa@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).