Lines Matching refs:perf_cpu
31 cpus = malloc(sizeof(*cpus) + sizeof(struct perf_cpu) * nr_cpus); in perf_cpu_map__alloc()
130 const struct perf_cpu *cpu_a = a, *cpu_b = b; in cmp_cpu()
135 static struct perf_cpu __perf_cpu_map__cpu(const struct perf_cpu_map *cpus, int idx) in __perf_cpu_map__cpu()
140 static struct perf_cpu_map *cpu_map__trim_new(int nr_cpus, const struct perf_cpu *tmp_cpus) in cpu_map__trim_new()
142 size_t payload_size = nr_cpus * sizeof(struct perf_cpu); in cpu_map__trim_new()
148 qsort(RC_CHK_ACCESS(cpus)->map, nr_cpus, sizeof(struct perf_cpu), cmp_cpu); in cpu_map__trim_new()
171 struct perf_cpu *tmp_cpus = NULL, *tmp; in perf_cpu_map__new()
217 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()
295 int perf_cpu_map__idx(const struct perf_cpu_map *cpus, struct perf_cpu cpu) in perf_cpu_map__idx()
306 struct perf_cpu cpu_at_idx = __perf_cpu_map__cpu(cpus, idx); in perf_cpu_map__idx()
320 bool perf_cpu_map__has(const struct perf_cpu_map *cpus, struct perf_cpu cpu) in perf_cpu_map__has()
351 struct perf_cpu perf_cpu_map__min(const struct perf_cpu_map *map) in perf_cpu_map__min()
353 struct perf_cpu cpu, result = { in perf_cpu_map__min()
365 struct perf_cpu perf_cpu_map__max(const struct perf_cpu_map *map) in perf_cpu_map__max()
367 struct perf_cpu result = { in perf_cpu_map__max()
410 struct perf_cpu *tmp_cpus; in perf_cpu_map__merge()
424 tmp_cpus = malloc(tmp_len * sizeof(struct perf_cpu)); in perf_cpu_map__merge()
456 struct perf_cpu *tmp_cpus; in perf_cpu_map__intersect()
467 tmp_cpus = malloc(tmp_len * sizeof(struct perf_cpu)); in perf_cpu_map__intersect()