Skip to content

Commit d1bac78

Browse files
captain5050namhyung
authored andcommitted
perf jevents metric: Fix type of strcmp_cpuid_str
The parser wraps all strings as Events, so the input is an Event. Using a string would be bad as functions like Simplify are called on the arguments, which wouldn't be present on a string. Fixes: 9d5da30 ("perf jevents: Add a new expression builtin strcmp_cpuid_str()") Signed-off-by: Ian Rogers <[email protected]> Cc: James Clark <[email protected]> Cc: Kajol Jain <[email protected]> Cc: John Garry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 33b725c commit d1bac78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/perf/pmu-events/metric.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -413,10 +413,10 @@ def has_event(event: Event) -> Function:
413413
# pylint: disable=invalid-name
414414
return Function('has_event', event)
415415

416-
def strcmp_cpuid_str(event: str) -> Function:
416+
def strcmp_cpuid_str(cpuid: Event) -> Function:
417417
# pylint: disable=redefined-builtin
418418
# pylint: disable=invalid-name
419-
return Function('strcmp_cpuid_str', event)
419+
return Function('strcmp_cpuid_str', cpuid)
420420

421421
class Metric:
422422
"""An individual metric that will specifiable on the perf command line."""

0 commit comments

Comments
 (0)