* [PATCH v1] perf jevents metric: Fix type of strcmp_cpuid_str
@ 2023-09-14 2:16 Ian Rogers
0 siblings, 0 replies; 3+ messages in thread
From: Ian Rogers @ 2023-09-14 2:16 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Ian Rogers, Adrian Hunter, Kajol Jain, John Garry, James Clark,
linux-perf-users, linux-kernel
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.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/pmu-events/metric.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py
index 0e9ec65d92ae..3e673f25d5fd 100644
--- a/tools/perf/pmu-events/metric.py
+++ b/tools/perf/pmu-events/metric.py
@@ -413,10 +413,10 @@ def has_event(event: Event) -> Function:
# pylint: disable=invalid-name
return Function('has_event', event)
-def strcmp_cpuid_str(event: str) -> Function:
+def strcmp_cpuid_str(cpuid: Event) -> Function:
# pylint: disable=redefined-builtin
# pylint: disable=invalid-name
- return Function('strcmp_cpuid_str', event)
+ return Function('strcmp_cpuid_str', cpuid)
class Metric:
"""An individual metric that will specifiable on the perf command line."""
--
2.42.0.459.ge4e396fd5e-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v1] perf jevents metric: Fix type of strcmp_cpuid_str
@ 2023-09-14 2:22 Ian Rogers
2023-09-17 5:26 ` Namhyung Kim
0 siblings, 1 reply; 3+ messages in thread
From: Ian Rogers @ 2023-09-14 2:22 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Ian Rogers, Adrian Hunter, Kajol Jain, John Garry, James Clark,
linux-perf-users, linux-kernel
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: 9d5da30e4ae9 ("perf jevents: Add a new expression builtin
strcmp_cpuid_str()")
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/pmu-events/metric.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py
index 0e9ec65d92ae..3e673f25d5fd 100644
--- a/tools/perf/pmu-events/metric.py
+++ b/tools/perf/pmu-events/metric.py
@@ -413,10 +413,10 @@ def has_event(event: Event) -> Function:
# pylint: disable=invalid-name
return Function('has_event', event)
-def strcmp_cpuid_str(event: str) -> Function:
+def strcmp_cpuid_str(cpuid: Event) -> Function:
# pylint: disable=redefined-builtin
# pylint: disable=invalid-name
- return Function('strcmp_cpuid_str', event)
+ return Function('strcmp_cpuid_str', cpuid)
class Metric:
"""An individual metric that will specifiable on the perf command line."""
--
2.42.0.459.ge4e396fd5e-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] perf jevents metric: Fix type of strcmp_cpuid_str
2023-09-14 2:22 [PATCH v1] perf jevents metric: Fix type of strcmp_cpuid_str Ian Rogers
@ 2023-09-17 5:26 ` Namhyung Kim
0 siblings, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2023-09-17 5:26 UTC (permalink / raw)
To: Ian Rogers
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
Kajol Jain, John Garry, James Clark, linux-perf-users,
linux-kernel
On Wed, Sep 13, 2023 at 7:22 PM Ian Rogers <irogers@google.com> wrote:
>
> 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: 9d5da30e4ae9 ("perf jevents: Add a new expression builtin
> strcmp_cpuid_str()")
>
> Signed-off-by: Ian Rogers <irogers@google.com>
Applied to perf-tools, thanks!
Namhyung
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-17 5:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14 2:22 [PATCH v1] perf jevents metric: Fix type of strcmp_cpuid_str Ian Rogers
2023-09-17 5:26 ` Namhyung Kim
-- strict thread matches above, loose matches on Subject: below --
2023-09-14 2:16 Ian Rogers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).