New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BOLT error while instrumenting Clang Executable on AArch64 #63255
Comments
@llvm/issue-subscribers-bolt |
Thanks for reporting this! Could you please try to comment if block here https://github.com/llvm/llvm-project/blob/main/bolt/runtime/CMakeLists.txt#L42-L53 for a while (in case you're not using MachO) and try to build again? |
@liamhouston Hello! Could you please provide instructions on how to reproduce your error? I see your directory name is "stage3-train", are you using "Optimizing Clang" tutorial? |
@ElvinaYakubova yes I'm following the Optimizing Clang tutorial. Here is the configure for the stage3-train clang-17 that I run the bolt instrument command on: I applied the three patches and commented out the if block and then configuring the BOLT build. Here is the configure for the BOLT Then I tried to use that bolt instrument on the stage3-train clang-17 executable |
@liamhouston do you use clang from stage2-prof-gen here DCMAKE_C_COMPILER=clang? I'm trying to reproduce the error, but the error occurred earlier, on buildCFG step. |
@ElvinaYakubova I use the clang from stage2-prof-gen to build the stage3-train clang. To build BOLT I use the baseline stage1 clang. |
@ElvinaYakubova Here's a script that recreates the error on my machine.
|
@liamhouston Thank you! I'll try to use it, because still can't get the same error as you |
As a suggestion: please try building with clang/cmake/caches/BOLT-PGO.cmake cache file, it simplifies the application of BOLT over (bootstrapped) PGO build. It uses a different profiling mechanism for PGO and BOLT (perf-training) but other than that, it follows the same steps. An example build configuration is given here: https://github.com/aaupov/llvm-devmtg-2022/blob/main/driver.sh, |
I removed the flag DCMAKE_[C|CXX]_FLAGS="-ftime-trace" in the configuration for the clang that BOLT was trying to instrument (the stage3-train clang). This allowed BOLT to instrument properly. |
|
@ElvinaYakubova |
I ran
llvm-bolt <clang-17 executable> -instrument -o <output file>
and received the following output:Running on LLVM version 17.0.0, targeting AArch64
The text was updated successfully, but these errors were encountered: