Lines Matching refs:perf_cpu

15 	struct perf_cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(struct perf_cpu) * nr_cpus);  in perf_cpu_map__alloc()
85 const struct perf_cpu *cpu_a = a, *cpu_b = b; in cmp_cpu()
90 static struct perf_cpu_map *cpu_map__trim_new(int nr_cpus, const struct perf_cpu *tmp_cpus) in cpu_map__trim_new()
92 size_t payload_size = nr_cpus * sizeof(struct perf_cpu); in cpu_map__trim_new()
98 qsort(cpus->map, nr_cpus, sizeof(struct perf_cpu), cmp_cpu); in cpu_map__trim_new()
115 struct perf_cpu *tmp_cpus = NULL, *tmp; in perf_cpu_map__read()
134 tmp = realloc(tmp_cpus, max_entries * sizeof(struct perf_cpu)); in perf_cpu_map__read()
145 tmp = realloc(tmp_cpus, max_entries * sizeof(struct perf_cpu)); in perf_cpu_map__read()
189 struct perf_cpu *tmp_cpus = NULL, *tmp; in perf_cpu_map__new()
235 tmp = realloc(tmp_cpus, max_entries * sizeof(struct perf_cpu)); in perf_cpu_map__new()
260 struct perf_cpu perf_cpu_map__cpu(const struct perf_cpu_map *cpus, int idx) in perf_cpu_map__cpu()
262 struct perf_cpu result = { in perf_cpu_map__cpu()
282 int perf_cpu_map__idx(const struct perf_cpu_map *cpus, struct perf_cpu cpu) in perf_cpu_map__idx()
293 struct perf_cpu cpu_at_idx = cpus->map[idx]; in perf_cpu_map__idx()
307 bool perf_cpu_map__has(const struct perf_cpu_map *cpus, struct perf_cpu cpu) in perf_cpu_map__has()
312 struct perf_cpu perf_cpu_map__max(const struct perf_cpu_map *map) in perf_cpu_map__max()
314 struct perf_cpu result = { in perf_cpu_map__max()
353 struct perf_cpu *tmp_cpus; in perf_cpu_map__merge()
366 tmp_cpus = malloc(tmp_len * sizeof(struct perf_cpu)); in perf_cpu_map__merge()