projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d5b635
)
perf python: Fix thread check in pyrf_evsel__read
author
Ian Rogers
<irogers@google.com>
Thu, 10 Jul 2025 23:51:23 +0000
(16:51 -0700)
committer
Namhyung Kim
<namhyung@kernel.org>
Fri, 11 Jul 2025 19:36:40 +0000
(12:36 -0700)
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>
tools/perf/util/python.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/python.c
b/tools/perf/util/python.c
index
0821205
..
4a3c2b4
100644
(file)
--- a/
tools/perf/util/python.c
+++ b/
tools/perf/util/python.c
@@
-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;