Lines Matching full:cpus

21 static struct perf_cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus)  in cpu_map__from_entries()  argument
25 map = perf_cpu_map__empty_new(cpus->nr); in cpu_map__from_entries()
29 for (i = 0; i < cpus->nr; i++) { in cpu_map__from_entries()
35 if (cpus->cpu[i] == (u16) -1) in cpu_map__from_entries()
38 map->map[i] = (int) cpus->cpu[i]; in cpu_map__from_entries()
83 struct perf_cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int) * nr); in perf_cpu_map__empty_new() local
85 if (cpus != NULL) { in perf_cpu_map__empty_new()
88 cpus->nr = nr; in perf_cpu_map__empty_new()
90 cpus->map[i] = -1; in perf_cpu_map__empty_new()
92 refcount_set(&cpus->refcnt, 1); in perf_cpu_map__empty_new()
95 return cpus; in perf_cpu_map__empty_new()
131 int cpu_map__build_map(struct perf_cpu_map *cpus, struct perf_cpu_map **res, in cpu_map__build_map() argument
136 int nr = cpus->nr; in cpu_map__build_map()
145 s1 = f(cpus, cpu, data); in cpu_map__build_map()
251 int cpu_map__build_socket_map(struct perf_cpu_map *cpus, struct perf_cpu_map **sockp) in cpu_map__build_socket_map() argument
253 return cpu_map__build_map(cpus, sockp, cpu_map__get_socket, NULL); in cpu_map__build_socket_map()
256 int cpu_map__build_die_map(struct perf_cpu_map *cpus, struct perf_cpu_map **diep) in cpu_map__build_die_map() argument
258 return cpu_map__build_map(cpus, diep, cpu_map__get_die, NULL); in cpu_map__build_die_map()
261 int cpu_map__build_core_map(struct perf_cpu_map *cpus, struct perf_cpu_map **corep) in cpu_map__build_core_map() argument
263 return cpu_map__build_map(cpus, corep, cpu_map__get_core, NULL); in cpu_map__build_core_map()
266 int cpu_map__build_node_map(struct perf_cpu_map *cpus, struct perf_cpu_map **numap) in cpu_map__build_node_map() argument
268 return cpu_map__build_map(cpus, numap, cpu_map__get_node, NULL); in cpu_map__build_node_map()
340 pr_err("Failed to read max cpus, using default of %d\n", max_cpu_num); in set_max_cpu_num()
478 bool cpu_map__has(struct perf_cpu_map *cpus, int cpu) in cpu_map__has() argument
480 return perf_cpu_map__idx(cpus, cpu) != -1; in cpu_map__has()
483 int cpu_map__cpu(struct perf_cpu_map *cpus, int idx) in cpu_map__cpu() argument
485 return cpus->map[idx]; in cpu_map__cpu()