Skip to content

Commit 45fc462

Browse files
captain5050acmel
authored andcommitted
perf parse-events: Fix driver config term
Inadvertently deleted in commit 30f4ade ("perf tools: Revert enable indices setting syntax for BPF map"). Fixes: 30f4ade ("perf tools: Revert enable indices setting syntax for BPF map") Reported-by: James Clark <[email protected]> Reviewed-by: James Clark <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 9ea150a commit 45fc462

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tools/perf/util/parse-events.y

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,23 @@ PE_TERM
839839

840840
$$ = term;
841841
}
842+
|
843+
PE_DRV_CFG_TERM
844+
{
845+
struct parse_events_term *term;
846+
char *config = strdup($1);
847+
int err;
848+
849+
if (!config)
850+
YYNOMEM;
851+
err = parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_DRV_CFG, config, $1, &@1, NULL);
852+
if (err) {
853+
free($1);
854+
free(config);
855+
PE_ABORT(err);
856+
}
857+
$$ = term;
858+
}
842859

843860
sep_dc: ':' |
844861

0 commit comments

Comments
 (0)