[compiler-rt] [llvm] [InstrProf] Add debuginfod correlation support (PR #106606)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 10:11:52 PDT 2024
================
@@ -0,0 +1,27 @@
+// REQUIRES: linux || windows
+// RUN: rm -rf %t
+
+// Default build with no profile correlation.
+// RUN: %clang_profgen -o %t.default.exe -Wl,--build-id=0x12345678 -fprofile-instr-generate -fcoverage-mapping %S/Inputs/instrprof-debug-info-correlate-main.cpp %S/Inputs/instrprof-debug-info-correlate-foo.cpp
+// RUN: env LLVM_PROFILE_FILE=%t.default.profraw %run %t.default.exe
+// RUN: llvm-profdata merge -o %t.default.profdata %t.default.profraw
+
+// Build with profile binary correlation and test llvm-profdata merge profile correlation with --binary-file option.
+// RUN: %clang_profgen -o %t.correlate.exe -Wl,--build-id=0x12345678 -fprofile-instr-generate -fcoverage-mapping -mllvm -profile-correlate=binary %S/Inputs/instrprof-debug-info-correlate-main.cpp %S/Inputs/instrprof-debug-info-correlate-foo.cpp
+// Strip above binary and run
+// RUN: llvm-strip %t.correlate.exe -o %t.stripped.exe
+// RUN: env LLVM_PROFILE_FILE=%t.correlate.profraw %run %t.stripped.exe
+// RUN: llvm-profdata merge -o %t.correlate-binary.profdata --binary-file=%t.correlate.exe %t.correlate.profraw
+// RUN: diff %t.default.profdata %t.correlate-binary.profdata
----------------
gulfemsavrun wrote:
Thanks for the suggestion, I used `diff`.
https://github.com/llvm/llvm-project/pull/106606
More information about the llvm-commits
mailing list