diff options
| author | Rong Xu <xur@google.com> | 2026-06-04 12:56:08 -0700 |
|---|---|---|
| committer | Nathan Chancellor <nathan@kernel.org> | 2026-06-05 21:12:08 -0700 |
| commit | 2566fa7b2f2402a77dae6a5e9b28a1bae1c20793 (patch) | |
| tree | 140ee19e4d49c6ddb3baefcfcfae0a2efb4488c0 /Documentation/dev-tools | |
| parent | e88b2fe8b9993c9cae856019b1c31c14b63cad7a (diff) | |
| download | linux-next-2566fa7b2f2402a77dae6a5e9b28a1bae1c20793.tar.gz linux-next-2566fa7b2f2402a77dae6a5e9b28a1bae1c20793.zip | |
kconfig: Remove the architecture specific config for Propeller
The CONFIG_PROPELLER_CLANG option currently depends on
ARCH_SUPPORTS_PROPELLER_CLANG, but this dependency seems unnecessary.
Remove ARCH_SUPPORTS_PROPELLER_CLANG and allow users to control
Propeller builds solely through CONFIG_PROPELLER_CLANG. This simplifies
the kconfig and avoids potential confusion.
Move the .llvm_bb_addr_map sections grouping to
include/asm-generic/vmlinux.lds.h.
The Propeller documentation has been updated to reflect the most
recent tool location and now includes instructions for arm64.
Contributor Acknowledgments:
* SPE instructions: Daniel Hoekwater <hoekwater@google.com>
Signed-off-by: Rong Xu <xur@google.com>
Suggested-by: Will Deacon <will@kernel.org>
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Yabin Cui <yabinc@google.com>
Reviewed-by: Kees Cook <kees@kernel.org>
Link: https://patch.msgid.link/20260604195612.3757860-3-xur@google.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'Documentation/dev-tools')
| -rw-r--r-- | Documentation/dev-tools/propeller.rst | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/Documentation/dev-tools/propeller.rst b/Documentation/dev-tools/propeller.rst index 92195958e3db..e927319941c9 100644 --- a/Documentation/dev-tools/propeller.rst +++ b/Documentation/dev-tools/propeller.rst @@ -28,8 +28,10 @@ A few important notes about adopting Propeller optimization: and the linker(ld.lld). #. In addition to LLVM toolchain, Propeller requires a profiling - conversion tool: https://github.com/google/autofdo with a release - after v0.30.1: https://github.com/google/autofdo/releases/tag/v0.30.1. + conversion tool: https://github.com/google/llvm-propeller. + +Current supported architectures include x86/X86_64 (via LBR), +and arm64 (via SPE). The Propeller optimization process involves the following steps: @@ -124,17 +126,30 @@ Here is an example workflow for building an AutoFDO+Propeller kernel: $ perf record --pfm-event RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a -N -b -c <count> -o <perf_file> -- <loadtest> - Note you can repeat the above steps to collect multiple <perf_file>s. + - For arm64 with SPE:: + There are a few kernel features that must be enabled to collect SPE profiles on Arm. + Below is a list of the required features: + + - CONFIG_ARM_SPE_PMU=y + - CONFIG_PID_IN_CONTEXTIDR=y + - kpti=off + + Use the following command to generate SPE perf data file:: + + $ perf record -e 'arm_spe_0/branch_filter=1,load_filter=0,store_filter=0/' -a -N -c <count> --no-switch-events -o <perf_file> -- <loadtest> + + Note you can repeat the above steps to collect multiple <perf_file>s. 4) (Optional) Download the raw perf file(s) to the host machine. -5) Use the create_llvm_prof tool (https://github.com/google/autofdo) to +5) Use the generate_propeller_profiles tool (https://github.com/google/llvm-propeller) to generate Propeller profile. :: - $ create_llvm_prof --binary=<vmlinux> --profile=<perf_file> - --format=propeller --propeller_output_module_name - --out=<propeller_profile_prefix>_cc_profile.txt - --propeller_symorder=<propeller_profile_prefix>_ld_profile.txt + $ generate_propeller_profiles \ + --binary=<vmlinux> --profile=<perf_file> \ + --format=propeller --propeller_output_module_name \ + --out=<propeller_profile_prefix>_cc_profile.txt \ + --propeller_symorder=<propeller_profile_prefix>_ld_profile.txt "<propeller_profile_prefix>" can be something like "/home/user/dir/any_string". @@ -146,10 +161,20 @@ Here is an example workflow for building an AutoFDO+Propeller kernel: you can create a temp list file "<perf_file_list>" with each line containing one perf file name and run:: - $ create_llvm_prof --binary=<vmlinux> --profile=@<perf_file_list> - --format=propeller --propeller_output_module_name - --out=<propeller_profile_prefix>_cc_profile.txt - --propeller_symorder=<propeller_profile_prefix>_ld_profile.txt + $ generate_propeller_profiles \ + --binary=<vmlinux> --profile=@<perf_file_list> \ + --format=propeller --propeller_output_module_name \ + --out=<propeller_profile_prefix>_cc_profile.txt \ + --propeller_symorder=<propeller_profile_prefix>_ld_profile.txt + + For arm64 SPE, add the option '--profiler=perf_spe', like:: + + $ generate_propeller_profiles \ + --binary=<vmlinux> --profile=<perf_file> \ + --profiler=perf_spe \ + --format=propeller --propeller_output_module_name \ + --out=<propeller_profile_prefix>_cc_profile.txt \ + --propeller_symorder=<propeller_profile_prefix>_ld_profile.txt 6) Rebuild the kernel using the AutoFDO and Propeller profiles. :: |
