mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-17 15:24:33 +00:00
perf python: Fix thread check in pyrf_evsel__read
The CPU index is incorrectly checked rather than the thread index.
Fixes: 739621f657 ("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>
This commit is contained in:
@@ -910,7 +910,7 @@ static PyObject *pyrf_evsel__read(struct pyrf_evsel *pevsel,
|
||||
return NULL;
|
||||
}
|
||||
thread_idx = perf_thread_map__idx(evsel->core.threads, thread);
|
||||
if (cpu_idx < 0) {
|
||||
if (thread_idx < 0) {
|
||||
PyErr_Format(PyExc_TypeError, "Thread %d is not part of evsel's threads",
|
||||
thread);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user