diff options
author | Ian Rogers <irogers@google.com> | 2025-07-10 16:51:23 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-15 16:39:07 +0200 |
commit | fc45f64987b606ce0de43ec49d9e93f235591fa6 (patch) | |
tree | aec7b522494d08649972982dfc401be005a566ab | |
parent | 879f07cc35351d24be09ee47c23351da89890a58 (diff) |
perf python: Fix thread check in pyrf_evsel__read
[ Upstream commit 64ec9b997f3a9462901a404ad60f452f76dd2d6e ]
The CPU index is incorrectly checked rather than the thread index.
Fixes: 739621f65702 ("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: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | tools/perf/util/python.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 321c333877fa..eb560e3f9e35 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -909,7 +909,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; |