The BOLT binary optimizer recommends using perf
to profile binaries for optimization. However, if "perf is not available" they have an llvm-bolt
mode which can also profile the application:
If perf record is not available to you, you may collect profile by first instrumenting the binary with BOLT and then running it.
Evidently, this is presented as a "second choice" by the BOLT authors.
What is the downside of this mode in terms of instrumentation quality? Evidently it is slower to collect the instrumentation, but is less accurate or effective at producing as input to the subsequent BOLT optimize call which produces a final optimized binary?