]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - tools/perf/builtin-ftrace.c
Merge tag 'Wimplicit-fallthrough-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kerne...
[mirror_ubuntu-eoan-kernel.git] / tools / perf / builtin-ftrace.c
index 66d5a6658daf542489d5eed878b9ed0e1035498a..01931281040563358793d74151233c8989df1082 100644 (file)
@@ -173,7 +173,7 @@ static int set_tracing_cpumask(struct cpu_map *cpumap)
        int last_cpu;
 
        last_cpu = cpu_map__cpu(cpumap, cpumap->nr - 1);
-       mask_size = (last_cpu + 3) / 4 + 1;
+       mask_size = last_cpu / 4 + 2; /* one more byte for EOS */
        mask_size += last_cpu / 32; /* ',' is needed for every 32th cpus */
 
        cpumask = malloc(mask_size);