summaryrefslogtreecommitdiff
path: root/tools/perf/pmu-events
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2023-10-10 23:36:36 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-10-10 23:36:36 +0300
commit87cd3d48191e533cd9c224f2da1d78b3513daf47 (patch)
treed48837ed88b6c544f94e30651744ae01f4163feb /tools/perf/pmu-events
parentd7c9ae8d5d1be0c4156d1e20e4369a77b711a4cc (diff)
parente47749f1796d1df39a7eaae95f2784aaa43df57d (diff)
downloadlinux-87cd3d48191e533cd9c224f2da1d78b3513daf47.tar.xz
Merge tag 'perf-tools-fixes-for-v6.6-1-2023-09-25' into perf-tools-next
To pick up the 'perf bench sched-seccomp-notify' changes to allow us to continue build testing perf-tools-next with the set of distro containers, where some older ones don't have a recent enough seccomp.h UAPI header that contains defines needed by this new 'perf bench' workload. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/pmu-events')
-rwxr-xr-xtools/perf/pmu-events/jevents.py2
-rw-r--r--tools/perf/pmu-events/metric.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
index fd009752b427..96dc74c90b20 100755
--- a/tools/perf/pmu-events/jevents.py
+++ b/tools/perf/pmu-events/jevents.py
@@ -1000,7 +1000,7 @@ const struct pmu_events_table *perf_pmu__find_events_table(struct perf_pmu *pmu)
}
}
free(cpuid);
- if (!pmu)
+ if (!pmu || !table)
return table;
for (i = 0; i < table->num_pmus; i++) {
diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py
index 1bbb89102901..92acd89ed97a 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."""