Lines Matching refs:tmp_cpus

140 static struct perf_cpu_map *cpu_map__trim_new(int nr_cpus, const struct perf_cpu *tmp_cpus)  in cpu_map__trim_new()  argument
147 memcpy(RC_CHK_ACCESS(cpus)->map, tmp_cpus, payload_size); in cpu_map__trim_new()
171 struct perf_cpu *tmp_cpus = NULL, *tmp; in perf_cpu_map__new() local
212 if (tmp_cpus[i].cpu == (int16_t)start_cpu) in perf_cpu_map__new()
217 tmp = realloc(tmp_cpus, max_entries * sizeof(struct perf_cpu)); in perf_cpu_map__new()
220 tmp_cpus = tmp; in perf_cpu_map__new()
222 tmp_cpus[nr_cpus++].cpu = (int16_t)start_cpu; in perf_cpu_map__new()
231 cpus = cpu_map__trim_new(nr_cpus, tmp_cpus); in perf_cpu_map__new()
240 free(tmp_cpus); in perf_cpu_map__new()
410 struct perf_cpu *tmp_cpus; in perf_cpu_map__merge() local
424 tmp_cpus = malloc(tmp_len * sizeof(struct perf_cpu)); in perf_cpu_map__merge()
425 if (!tmp_cpus) in perf_cpu_map__merge()
434 tmp_cpus[k++] = __perf_cpu_map__cpu(*orig, i++); in perf_cpu_map__merge()
436 tmp_cpus[k++] = __perf_cpu_map__cpu(other, j++); in perf_cpu_map__merge()
440 tmp_cpus[k++] = __perf_cpu_map__cpu(*orig, i++); in perf_cpu_map__merge()
443 tmp_cpus[k++] = __perf_cpu_map__cpu(other, j++); in perf_cpu_map__merge()
446 merged = cpu_map__trim_new(k, tmp_cpus); in perf_cpu_map__merge()
447 free(tmp_cpus); in perf_cpu_map__merge()
456 struct perf_cpu *tmp_cpus; in perf_cpu_map__intersect() local
467 tmp_cpus = malloc(tmp_len * sizeof(struct perf_cpu)); in perf_cpu_map__intersect()
468 if (!tmp_cpus) in perf_cpu_map__intersect()
479 tmp_cpus[k++] = __perf_cpu_map__cpu(orig, i++); in perf_cpu_map__intersect()
483 merged = cpu_map__trim_new(k, tmp_cpus); in perf_cpu_map__intersect()
484 free(tmp_cpus); in perf_cpu_map__intersect()