Limit perf data buffer during profiling
With high -j parallelism the autofdo tests can randomly fail.
autofdo uses Linux perf to record profiling data.
Linux perf uses a locked perf buffer. By default it has
around 516k buffer per uid (/proc/sys/kernel/perf_event_mlock_kb).
An individual perf record tries to grab the full 516k,
which makes parallel perf record fail.
This patch limits the perf buffer for individual perf record to 8k.
With the default settings this allows a parallelism of the test
cases of 16, which is hopefully good enough
(if not would need to add some kind of semaphore, or ask
the user to increase the limit as root)
I also removed an unneeded -o perf.data option
Thanks to Marcin to finally spotting the problem.
Passes bootstrap and test on x86_64-linux. Ok for trunk?
gcc/testsuite/:
2017-05-12 Andi Kleen <ak@linux.intel.com>
PR testsuite/77684
* lib/target-supports.exp (profopt-perf-wrapper):
Add -m8 option to increase parallelism.
From-SVN: r247962