This directory contains AutoFDO profiles for Android common kernels. These profiles can be used to optimize kernel builds for specific architectures and kernel versions. Following is the profile directory structure.
kernel |-- README.md |-- BUILD.bazel |-- aarch64 | |-- android16-6.12 | | |-- kernel.afdo | | |-- source_info.md | +-- ... +-- ...
kernel - The root directory for all AutoFDO profiles.README.md - This file.BUILD.bazel - Bazel build file that exports all profiles.<arch>/ - A directory containing profiles for a specific architecture (e.g., aarch64).<kernel_branch>/ - A directory containing profiles for a specific kernel branch (e.g., android16-6.12).kernel.afdo - The AutoFDO profile file.source_info.md - A file containing information about the source code used to generate the profile.| Benchmark | Improvement |
|---|---|
| Boot time | 2.1% |
| Cold App launch time | 3.1% |
| Binder-rpc | 7.8% |
| Binder-addints | 30.2% |
| Hwbinder | 17.7% |
| Bionic (syscall_mmap) | 5.0% |
| Bionic (pthread) | 2.4% |
| Bionic (stdio) | 3.0% |
| Bionic (all) | 1.2% |
A kernel profile is generated by running app crawling and app launching for top 100 apps from Google Play Store. While running, we collect ETM data for the kernel, which records executed instruction stream. Finally, we merge and convert ETM data to one AutoFDO profile.
source_info.md.https://developer.android.com/studio/test/other-testing-tools/app-crawler.simpleperf record -e cs-etm:k -a to record ETM data for the kernel. A document for collecting and converting ETM data is in https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/collect_etm_data_for_autofdo.md.