Skip to content

Commit f978ae2

Browse files
committed
perf python: Fix thread check in pyrf_evsel__read
JIRA: https://issues.redhat.com/browse/RHEL-78198 upstream ======== commit 64ec9b9 Author: Ian Rogers <irogers@google.com> Date: Thu Jul 10 16:51:23 2025 -0700 description =========== The CPU index is incorrectly checked rather than the thread index. Fixes: 739621f ("perf python: Add evsel read method") Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250710235126.1086011-11-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 2079b4b commit f978ae2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/python.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ static PyObject *pyrf_evsel__read(struct pyrf_evsel *pevsel,
910910
return NULL;
911911
}
912912
thread_idx = perf_thread_map__idx(evsel->core.threads, thread);
913-
if (cpu_idx < 0) {
913+
if (thread_idx < 0) {
914914
PyErr_Format(PyExc_TypeError, "Thread %d is not part of evsel's threads",
915915
thread);
916916
return NULL;

0 commit comments

Comments
 (0)