linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH V3 0/1] perf tools: Allow config terms with breakpoints
Date: Wed, 7 Jun 2023 10:48:08 -0300	[thread overview]
Message-ID: <ZICKmA1kcDa2nG53@kernel.org> (raw)
In-Reply-To: <f7228dc9-fe18-a8e3-7d3f-52922e0e1113@intel.com>

Em Wed, Jun 07, 2023 at 08:33:07AM +0300, Adrian Hunter escreveu:
> Maybe this is cleaner:

It is, I folded it into your original patch, thanks!

- Arnaldo
 
> 
> From: Adrian Hunter <adrian.hunter@intel.com>
> Date: Wed, 7 Jun 2023 08:12:29 +0300
> Subject: [PATCH] perf tools: Suppress bison unused value warnings
> 
> Patch "perf tools: Allow config terms with breakpoints" introduced
> parse tokens for colons and slashes within breakpoint parsing to
> prevent mix up with colons and slashes related to config terms.
> 
> The token values are not needed but introduce bison "unused value"
> warnings.
> 
> Suppress those warnings.
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  tools/perf/util/parse-events.h | 4 ++++
>  tools/perf/util/parse-events.y | 7 +++++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
> index b0eb95f93e9c..5fdc1f33f57e 100644
> --- a/tools/perf/util/parse-events.h
> +++ b/tools/perf/util/parse-events.h
> @@ -228,6 +228,10 @@ void parse_events_error__handle(struct parse_events_error *err, int idx,
>  void parse_events_error__print(struct parse_events_error *err,
>  			       const char *event);
>  
> +static inline void parse_events_unused_value(const void *x __maybe_unused)
> +{
> +}
> +
>  #ifdef HAVE_LIBELF_SUPPORT
>  /*
>   * If the probe point starts with '%',
> diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> index bbfb8110947c..0c3d086cc22a 100644
> --- a/tools/perf/util/parse-events.y
> +++ b/tools/perf/util/parse-events.y
> @@ -510,6 +510,9 @@ PE_PREFIX_MEM PE_VALUE PE_BP_SLASH PE_VALUE PE_BP_COLON PE_MODIFIER_BP opt_event
>  	struct list_head *list;
>  	int err;
>  
> +	parse_events_unused_value(&$3);
> +	parse_events_unused_value(&$5);
> +
>  	list = alloc_list();
>  	ABORT_ON(!list);
>  	err = parse_events_add_breakpoint(_parse_state, list,
> @@ -528,6 +531,8 @@ PE_PREFIX_MEM PE_VALUE PE_BP_SLASH PE_VALUE opt_event_config
>  	struct list_head *list;
>  	int err;
>  
> +	parse_events_unused_value(&$3);
> +
>  	list = alloc_list();
>  	ABORT_ON(!list);
>  	err = parse_events_add_breakpoint(_parse_state, list,
> @@ -545,6 +550,8 @@ PE_PREFIX_MEM PE_VALUE PE_BP_COLON PE_MODIFIER_BP opt_event_config
>  	struct list_head *list;
>  	int err;
>  
> +	parse_events_unused_value(&$3);
> +
>  	list = alloc_list();
>  	ABORT_ON(!list);
>  	err = parse_events_add_breakpoint(_parse_state, list,
> -- 
> 2.34.1
> 
> 

-- 

- Arnaldo

      reply	other threads:[~2023-06-07 13:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25  8:29 [PATCH V3 0/1] perf tools: Allow config terms with breakpoints Adrian Hunter
2023-05-25  8:29 ` [PATCH V3 1/1] " Adrian Hunter
2023-06-06  5:00 ` [PATCH V3 0/1] " Adrian Hunter
2023-06-06 18:15   ` Arnaldo Carvalho de Melo
2023-06-06 19:22     ` Arnaldo Carvalho de Melo
2023-06-06 19:37       ` Adrian Hunter
2023-06-07  5:33         ` Adrian Hunter
2023-06-07 13:48           ` Arnaldo Carvalho de Melo [this message]

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=ZICKmA1kcDa2nG53@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@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;
as well as URLs for NNTP newsgroup(s).