4 // Default instrumented build with no profile correlation.
5 // RUN: %clang_pgogen -o %t.default -Wl,--build-id=0x12345678 -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
6 // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.default
7 // RUN: llvm-profdata merge -o %t.default.profdata %t.profraw
9 // Build with profile debuginfo correlation.
10 // RUN: %clang_pgogen -o %t.correlate.exe -Wl,--build-id=0x12345678 -g -gdwarf-4 -mllvm --debug-info-correlate -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
11 // RUN: env LLVM_PROFILE_FILE=%t.debug-info-correlate.proflite %run %t.correlate.exe
13 // Test llvm-profdata merge profile correlation with --debuginfod option.
14 // RUN: mkdir -p %t/buildid/12345678
15 // RUN: cp %t.correlate.exe %t/buildid/12345678/debuginfo
16 // RUN: mkdir -p %t/debuginfod-cache
17 // RUN: env DEBUGINFOD_CACHE_PATH=%t/debuginfod-cache DEBUGINFOD_URLS=file://%t llvm-profdata merge -o %t.correlate-debuginfod.profdata --debuginfod --correlate=debug-info %t.debug-info-correlate.proflite
18 // RUN: diff <(llvm-profdata show --all-functions --counts %t.default.profdata) <(llvm-profdata show --all-functions --counts %t.correlate-debuginfod.profdata)
20 // Test llvm-profdata merge profile correlation with --debug-file-directory option.
21 // RUN: mkdir -p %t/.build-id/12
22 // RUN: cp %t.correlate.exe %t/.build-id/12/345678.debug
23 // RUN: llvm-profdata merge -o %t.correlate-debug-file-dir.profdata --debug-file-directory %t --correlate=debug-info %t.debug-info-correlate.proflite
24 // RUN: diff <(llvm-profdata show --all-functions --counts %t.default.profdata) <(llvm-profdata show --all-functions --counts %t.correlate-debug-file-dir.profdata)