summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2023-09-04 20:38:05 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-09-05 09:39:13 -0300
commit45fc4628c15ab2cb7b2f53354b21db63f0a41f81 (patch)
tree7bf28986702a0cc21c4e9fb93360168483e466d0
parent9ea150a8d073c2f2987d7e9ea4c35856449c9cb2 (diff)
downloadlinux-stable-45fc4628c15ab2cb7b2f53354b21db63f0a41f81.tar.gz
linux-stable-45fc4628c15ab2cb7b2f53354b21db63f0a41f81.tar.bz2
linux-stable-45fc4628c15ab2cb7b2f53354b21db63f0a41f81.zip
perf parse-events: Fix driver config term
Inadvertently deleted in commit 30f4ade33d649aa0 ("perf tools: Revert enable indices setting syntax for BPF map"). Fixes: 30f4ade33d649aa0 ("perf tools: Revert enable indices setting syntax for BPF map") Reported-by: James Clark <james.clark@arm.com> Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20230905033805.3094293-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/parse-events.y17
1 files changed, 17 insertions, 0 deletions
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: ':' |