https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121038
--- Comment #1 from Andi Kleen <andi-gcc at firstfloor dot org> --- 1) If you don't get data loss (perf should complain) the -m change should be fine. Alternatively increase /proc/sys/kernel/perf_event_mlock_kb 5) IIRC the --all was a workaround for something, but I can't remember the original problem. If it works without it yes we don't need it. Probably it makes not much difference anyways because there shouldn't be much kernel time. One million is actually a fairly slow sampling period, typically we sample faster. The reason for the large period was to avoid running out of memory from too large perf.data files. create_gcov loads everything into memory and I couldn't built on a 32GB (or maybe it was 16GB) machine. Yes more primish would be better but not sure if it makes a lot of difference on something like gcc which i presume is not very periodic anyways. Maybe that should be tuned based on the available memory. Or we finally fix the tooling to be sane.