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 <[email protected]>
> Signed-off-by: Ian Rogers <[email protected]>
> ---
> 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 <[email protected]>
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 <[email protected]>
> > Signed-off-by: Ian Rogers <[email protected]>
> > ---
> > 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 <[email protected]>
Thanks, applied.
- Arnaldo