We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9edcde6 commit 1d1d9afCopy full SHA for 1d1d9af
tools/perf/util/python.c
@@ -638,17 +638,17 @@ static Py_ssize_t pyrf_cpu_map__length(PyObject *obj)
638
{
639
struct pyrf_cpu_map *pcpus = (void *)obj;
640
641
- return pcpus->cpus->nr;
+ return perf_cpu_map__nr(pcpus->cpus);
642
}
643
644
static PyObject *pyrf_cpu_map__item(PyObject *obj, Py_ssize_t i)
645
646
647
648
- if (i >= pcpus->cpus->nr)
+ if (i >= perf_cpu_map__nr(pcpus->cpus))
649
return NULL;
650
651
- return Py_BuildValue("i", pcpus->cpus->map[i]);
+ return Py_BuildValue("i", perf_cpu_map__cpu(pcpus->cpus, i).cpu);
652
653
654
static PySequenceMethods pyrf_cpu_map__sequence_methods = {
0 commit comments