linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] perf parse-events: Fix driver config term
@ 2023-09-05  3:38 Ian Rogers
  2023-09-05  3:51 ` Ian Rogers
  2023-09-05  8:40 ` James Clark
  0 siblings, 2 replies; 5+ messages in thread
From: Ian Rogers @ 2023-09-05  3:38 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel,
	James Clark

Inadvertently deleted in commit 30f4ade33d64 ("perf tools: Revert
enable indices setting syntax for BPF map").

Reported-by: James Clark <james.clark@arm.com>
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/parse-events.y | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 4a305df61f74..21bfe7e0d944 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -839,6 +839,23 @@ PE_TERM
 
 	$$ = term;
 }
+|
+PE_DRV_CFG_TERM
+{
+	struct parse_events_term *term;
+	char *config = strdup($1);
+	int err;
+
+	if (!config)
+		YYNOMEM;
+	err = parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_DRV_CFG, config, $1, &@1, NULL);
+	if (err) {
+		free($1);
+		free(config);
+		PE_ABORT(err);
+	}
+	$$ = term;
+}
 
 sep_dc: ':' |
 
-- 
2.42.0.283.g2d96d420d3-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] perf parse-events: Fix driver config term
  2023-09-05  3:38 [PATCH v1] perf parse-events: Fix driver config term Ian Rogers
@ 2023-09-05  3:51 ` Ian Rogers
  2023-09-05 12:40   ` Arnaldo Carvalho de Melo
  2023-09-05  8:40 ` James Clark
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Rogers @ 2023-09-05  3:51 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel,
	James Clark

On Mon, Sep 4, 2023 at 8:38 PM Ian Rogers <irogers@google.com> wrote:
>
> Inadvertently deleted in commit 30f4ade33d64 ("perf tools: Revert
> enable indices setting syntax for BPF map").
>

Sorry, should also have:
Fixes: 30f4ade33d64 ("perf tools: Revert enable indices setting syntax
for BPF map")

Thanks,
Ian

> Reported-by: James Clark <james.clark@arm.com>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/util/parse-events.y | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> index 4a305df61f74..21bfe7e0d944 100644
> --- a/tools/perf/util/parse-events.y
> +++ b/tools/perf/util/parse-events.y
> @@ -839,6 +839,23 @@ PE_TERM
>
>         $$ = term;
>  }
> +|
> +PE_DRV_CFG_TERM
> +{
> +       struct parse_events_term *term;
> +       char *config = strdup($1);
> +       int err;
> +
> +       if (!config)
> +               YYNOMEM;
> +       err = parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_DRV_CFG, config, $1, &@1, NULL);
> +       if (err) {
> +               free($1);
> +               free(config);
> +               PE_ABORT(err);
> +       }
> +       $$ = term;
> +}
>
>  sep_dc: ':' |
>
> --
> 2.42.0.283.g2d96d420d3-goog
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] perf parse-events: Fix driver config term
  2023-09-05  3:38 [PATCH v1] perf parse-events: Fix driver config term Ian Rogers
  2023-09-05  3:51 ` Ian Rogers
@ 2023-09-05  8:40 ` James Clark
  2023-09-05 12:40   ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 5+ messages in thread
From: James Clark @ 2023-09-05  8:40 UTC (permalink / raw)
  To: Ian Rogers, Arnaldo Carvalho de Melo
  Cc: Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, linux-perf-users, linux-kernel, Peter Zijlstra,
	Ingo Molnar



On 05/09/2023 04:38, Ian Rogers wrote:
> Inadvertently deleted in commit 30f4ade33d64 ("perf tools: Revert
> enable indices setting syntax for BPF map").
> 
> Reported-by: James Clark <james.clark@arm.com>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/util/parse-events.y | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> index 4a305df61f74..21bfe7e0d944 100644
> --- a/tools/perf/util/parse-events.y
> +++ b/tools/perf/util/parse-events.y
> @@ -839,6 +839,23 @@ PE_TERM
>  
>  	$$ = term;
>  }
> +|
> +PE_DRV_CFG_TERM
> +{
> +	struct parse_events_term *term;
> +	char *config = strdup($1);
> +	int err;
> +
> +	if (!config)
> +		YYNOMEM;
> +	err = parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_DRV_CFG, config, $1, &@1, NULL);
> +	if (err) {
> +		free($1);
> +		free(config);
> +		PE_ABORT(err);
> +	}
> +	$$ = term;
> +}
>  
>  sep_dc: ':' |
>  

Reviewed-by: James Clark <james.clark@arm.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] perf parse-events: Fix driver config term
  2023-09-05  3:51 ` Ian Rogers
@ 2023-09-05 12:40   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-09-05 12:40 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, linux-perf-users,
	linux-kernel, James Clark

Em Mon, Sep 04, 2023 at 08:51:37PM -0700, Ian Rogers escreveu:
> On Mon, Sep 4, 2023 at 8:38 PM Ian Rogers <irogers@google.com> wrote:
> >
> > Inadvertently deleted in commit 30f4ade33d64 ("perf tools: Revert
> > enable indices setting syntax for BPF map").
> >
> 
> Sorry, should also have:
> Fixes: 30f4ade33d64 ("perf tools: Revert enable indices setting syntax
> for BPF map")

I added it, thanks.
 
> Thanks,
> Ian
> 
> > Reported-by: James Clark <james.clark@arm.com>
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> >  tools/perf/util/parse-events.y | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> >
> > diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> > index 4a305df61f74..21bfe7e0d944 100644
> > --- a/tools/perf/util/parse-events.y
> > +++ b/tools/perf/util/parse-events.y
> > @@ -839,6 +839,23 @@ PE_TERM
> >
> >         $$ = term;
> >  }
> > +|
> > +PE_DRV_CFG_TERM
> > +{
> > +       struct parse_events_term *term;
> > +       char *config = strdup($1);
> > +       int err;
> > +
> > +       if (!config)
> > +               YYNOMEM;
> > +       err = parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_DRV_CFG, config, $1, &@1, NULL);
> > +       if (err) {
> > +               free($1);
> > +               free(config);
> > +               PE_ABORT(err);
> > +       }
> > +       $$ = term;
> > +}
> >
> >  sep_dc: ':' |
> >
> > --
> > 2.42.0.283.g2d96d420d3-goog
> >

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] perf parse-events: Fix driver config term
  2023-09-05  8:40 ` James Clark
@ 2023-09-05 12:40   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-09-05 12:40 UTC (permalink / raw)
  To: James Clark
  Cc: Ian Rogers, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, Adrian Hunter, linux-perf-users, linux-kernel,
	Peter Zijlstra, Ingo Molnar

Em Tue, Sep 05, 2023 at 09:40:30AM +0100, James Clark escreveu:
> 
> 
> On 05/09/2023 04:38, Ian Rogers wrote:
> > Inadvertently deleted in commit 30f4ade33d64 ("perf tools: Revert
> > enable indices setting syntax for BPF map").
> > 
> > Reported-by: James Clark <james.clark@arm.com>
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> >  tools/perf/util/parse-events.y | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> > 
> > diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> > index 4a305df61f74..21bfe7e0d944 100644
> > --- a/tools/perf/util/parse-events.y
> > +++ b/tools/perf/util/parse-events.y
> > @@ -839,6 +839,23 @@ PE_TERM
> >  
> >  	$$ = term;
> >  }
> > +|
> > +PE_DRV_CFG_TERM
> > +{
> > +	struct parse_events_term *term;
> > +	char *config = strdup($1);
> > +	int err;
> > +
> > +	if (!config)
> > +		YYNOMEM;
> > +	err = parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_DRV_CFG, config, $1, &@1, NULL);
> > +	if (err) {
> > +		free($1);
> > +		free(config);
> > +		PE_ABORT(err);
> > +	}
> > +	$$ = term;
> > +}
> >  
> >  sep_dc: ':' |
> >  
> 
> Reviewed-by: James Clark <james.clark@arm.com>



Thanks, applied.

- Arnaldo


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-05 16:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-05  3:38 [PATCH v1] perf parse-events: Fix driver config term Ian Rogers
2023-09-05  3:51 ` Ian Rogers
2023-09-05 12:40   ` Arnaldo Carvalho de Melo
2023-09-05  8:40 ` James Clark
2023-09-05 12:40   ` Arnaldo Carvalho de Melo

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).