Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf python: Fix thread check in pyrf_evsel__read

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>

authored by

Ian Rogers and committed by
Namhyung Kim
64ec9b99 7d5b635d

+1 -1
+1 -1
tools/perf/util/python.c
··· 910 910 return NULL; 911 911 } 912 912 thread_idx = perf_thread_map__idx(evsel->core.threads, thread); 913 - if (cpu_idx < 0) { 913 + if (thread_idx < 0) { 914 914 PyErr_Format(PyExc_TypeError, "Thread %d is not part of evsel's threads", 915 915 thread); 916 916 return NULL;