Optimize AArch64 binaries with LLVM BOLT
Introduction
Understand BOLT optimization for Arm
Prepare your environment
Identify programs for BOLT optimization
Optimize with BRBE profiling
Optimize with instrumentation profiling
Optimize with ETM profiling
Optimize with SPE profiling
Optimize with PMU profiling
Verify BOLT optimization results
Next Steps
Optimize AArch64 binaries with LLVM BOLT
Introduction
Understand BOLT optimization for Arm
Prepare your environment
Identify programs for BOLT optimization
Optimize with BRBE profiling
Optimize with instrumentation profiling
Optimize with ETM profiling
Optimize with SPE profiling
Optimize with PMU profiling
Verify BOLT optimization results
Next Steps
Who is this for?
This is an introductory topic for developers who have compiled an AArch64 Linux application and want to evaluate whether LLVM BOLT can improve its runtime performance.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Identify whether a program is a good candidate for code layout optimization
- Prepare an environment with LLVM BOLT on Linux
- Use LLVM BOLT to perform profile-guided post-link optimization of an AArch64 binary with poor spatial locality
- Collect profile data using multiple techniques, including BRBE, instrumentation, SPE, ETM, and PMU event sampling
- Evaluate the impact of BOLT optimizations using performance metrics and profiling data
Prerequisites
Before starting, you will need the following:
- An AArch64 system running Linux, such as an Arm AGI CPU platform, with LLVM BOLT and perf installed
- Linux kernel version 6.17 or later to enable Branch Record Buffer Extension ( BRBE profiling )
- Linux kernel version 6.14 or later for Arm Statistical Profiling Extension ( SPE profiling )
- Linux kernel with Arm CoreSight enabled for Embedded Trace Macrocell ( ETM profiling )
- GCC version 13.3 or later to compile the example program ( GCC )
- A system with sufficient hardware performance counters to use the TopDown methodology. This typically requires running on bare metal rather than a virtualized environment.
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.