Home
last modified time | relevance | path

Searched refs:tmp_cpus (Results 1 – 2 of 2) sorted by relevance

/tools/lib/perf/
Dcpumap.c107 static struct perf_cpu_map *cpu_map__trim_new(int nr_cpus, const struct perf_cpu *tmp_cpus) in cpu_map__trim_new() argument
114 memcpy(RC_CHK_ACCESS(cpus)->map, tmp_cpus, payload_size); in cpu_map__trim_new()
136 struct perf_cpu *tmp_cpus = NULL, *tmp; in perf_cpu_map__read() local
155 tmp = realloc(tmp_cpus, max_entries * sizeof(struct perf_cpu)); in perf_cpu_map__read()
158 tmp_cpus = tmp; in perf_cpu_map__read()
162 tmp_cpus[nr_cpus++].cpu = prev; in perf_cpu_map__read()
166 tmp = realloc(tmp_cpus, max_entries * sizeof(struct perf_cpu)); in perf_cpu_map__read()
169 tmp_cpus = tmp; in perf_cpu_map__read()
172 tmp_cpus[nr_cpus++].cpu = cpu; in perf_cpu_map__read()
182 cpus = cpu_map__trim_new(nr_cpus, tmp_cpus); in perf_cpu_map__read()
[all …]
/tools/lib/bpf/
Dlibbpf.c12930 int err, n, i, tmp_cpus; in libbpf_num_possible_cpus() local
12933 tmp_cpus = READ_ONCE(cpus); in libbpf_num_possible_cpus()
12934 if (tmp_cpus > 0) in libbpf_num_possible_cpus()
12935 return tmp_cpus; in libbpf_num_possible_cpus()
12941 tmp_cpus = 0; in libbpf_num_possible_cpus()
12944 tmp_cpus++; in libbpf_num_possible_cpus()
12948 WRITE_ONCE(cpus, tmp_cpus); in libbpf_num_possible_cpus()
12949 return tmp_cpus; in libbpf_num_possible_cpus()