Skip to content

Commit 64ec9b9

Browse files
captain5050namhyung
authored andcommitted
perf python: Fix thread check in pyrf_evsel__read
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>
1 parent 7d5b635 commit 64ec9b9

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)