Lines Matching refs:idx
66 int idx __maybe_unused)
77 static int perf_mmap__aio_alloc(struct mmap *map, int idx)
79 map->aio.data[idx] = mmap(NULL, mmap__mmap_len(map), PROT_READ|PROT_WRITE,
81 if (map->aio.data[idx] == MAP_FAILED) {
82 map->aio.data[idx] = NULL;
89 static void perf_mmap__aio_free(struct mmap *map, int idx)
91 if (map->aio.data[idx]) {
92 munmap(map->aio.data[idx], mmap__mmap_len(map));
93 map->aio.data[idx] = NULL;
97 static int perf_mmap__aio_bind(struct mmap *map, int idx, struct perf_cpu cpu, int affinity)
106 data = map->aio.data[idx];
126 static int perf_mmap__aio_alloc(struct mmap *map, int idx)
128 map->aio.data[idx] = malloc(mmap__mmap_len(map));
129 if (map->aio.data[idx] == NULL)
135 static void perf_mmap__aio_free(struct mmap *map, int idx)
137 zfree(&(map->aio.data[idx]));
140 static int perf_mmap__aio_bind(struct mmap *map __maybe_unused, int idx __maybe_unused,
247 int idx, nr_cpus;
256 for (idx = 0; idx < nr_cpus; idx++) {
257 cpu = perf_cpu_map__cpu(cpu_map, idx); /* map c index to online cpu index */