]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf expr: Fix "has_event" function for metric style events
authorIan Rogers <irogers@google.com>
Fri, 9 Feb 2024 20:49:45 +0000 (12:49 -0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:48 +0000 (18:19 -0400)
commite40ef597e57c83cf7bd4e44a8bdad82043704673
treea52dc3c5f80644e7817a0bf5f529de17a3612319
parent435e7f647428b9fde70b905c0f7ddb89f54e10ed
perf expr: Fix "has_event" function for metric style events

[ Upstream commit 6dd76680b925228312756c13b9b983661b552a64 ]

Events in metrics cannot use '/' as a separator, it would be
recognized as a divide, so they use '@'. The '@' is recognized in the
metricgroups code and changed to '/', do the same in the has_event
function so that the parsing is only tried without the @s.

Fixes: 4a4a9bf9075f ("perf expr: Add has_event function")
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Kaige Ye <ye@kaige.org>
Cc: John Garry <john.g.garry@oracle.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240209204947.3873294-3-irogers@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/util/expr.c