perf provides a faster and easier way to collect BOLT profile. Generalize CMake
handling of applying BOLT to Clang to allow using perf with or without branch
stacks (LBR) for profile collection. This also enables Clang-BOLT for AArch64
platforms with perf profiling enabled.
Details
- Reviewers
phosek - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Could we add the perf related logic to https://github.com/llvm/llvm-project/blob/ba3d808feedaa7f31750d8bc02754e15b372c868/clang/utils/perf-training/perf-helper.py? I think that's a better place since we eventually want to replace the use of ExternalProject_Add with https://github.com/llvm/llvm-project/tree/main/clang/utils/perf-training so we should try to keep the amount of logic in CMake down to minimum.
Sure! I didn't realize perf-helper had dtrace functionality in place. Adding Linux perf functions would be logical.
@phosek – this diff adds support for AArch64 via Linux perf. I believe it makes sense to add this functionality first in an incremental fashion and refactor it later, moving parts into perf-training script. What do you think? (And thank you for reviewing this stuff!)