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?

After completing this Learning Path, you'll be able to perform the following tasks:

  • 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
  • Visualize the layout changes performed by BOLT on an AArch64 binary using heatmaps

Prerequisites

Before starting, you'll need the following prerequisites:

  • 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

AI-assisted

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.

Close
?
You’ll use LLVM BOLT to optimize AArch64 binary code layout. Starting with a deliberately inefficient BubbleSort example, you’ll prepare your environment and identify poor instruction locality using Arm TopDown metrics. You’ll collect profiles using a supported method and generate an optimized binary. Finally, you’ll compare runtime measurements, hardware metrics, and heatmaps to evaluate performance and inspect code layout changes.
Next