diff --git a/llvm/test/tools/llvm-profdata/memprof-basic.test b/llvm/test/tools/llvm-profdata/memprof-basic.test --- a/llvm/test/tools/llvm-profdata/memprof-basic.test +++ b/llvm/test/tools/llvm-profdata/memprof-basic.test @@ -26,9 +26,10 @@ ``` clang -fuse-ld=lld -Wl,--no-rosegment -gmlt -fdebug-info-for-profiling \ -fmemory-profile -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer \ - -fno-optimize-sibling-calls -m64 -Wl,-build-id source.c -o basic.memprofexe + -fno-optimize-sibling-calls -m64 -Wl,-build-id -Wl,-no-pie \ + source.c -o basic.memprofexe -env MEMPROF_OPTIONS=log_path=stdout ./rawprofile.out > basic.memprofraw +env MEMPROF_OPTIONS=log_path=stdout ./basic.memprofexe > basic.memprofraw ``` RUN: llvm-profdata show --memory %p/Inputs/basic.memprofraw --profiled-binary %p/Inputs/basic.memprofexe -o - | FileCheck %s diff --git a/llvm/test/tools/llvm-profdata/memprof-inline.test b/llvm/test/tools/llvm-profdata/memprof-inline.test --- a/llvm/test/tools/llvm-profdata/memprof-inline.test +++ b/llvm/test/tools/llvm-profdata/memprof-inline.test @@ -30,9 +30,10 @@ ``` bin/clang -fuse-ld=lld -Wl,--no-rosegment -gmlt -fdebug-info-for-profiling \ -fmemory-profile -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer \ - -fno-optimize-sibling-calls -m64 -Wl,-build-id inline.c -o memprof-inline.exe + -fno-optimize-sibling-calls -m64 -Wl,-build-id -Wl,-no-pie \ + inline.c -o inline.memprofexe -env MEMPROF_OPTIONS=log_path=stdout ./memprof-inline.exe > inline.memprofraw +env MEMPROF_OPTIONS=log_path=stdout ./inline.memprofexe > inline.memprofraw ``` RUN: llvm-profdata show --memory %p/Inputs/inline.memprofraw --profiled-binary %p/Inputs/inline.memprofexe | FileCheck %s diff --git a/llvm/test/tools/llvm-profdata/memprof-merge.test b/llvm/test/tools/llvm-profdata/memprof-merge.test --- a/llvm/test/tools/llvm-profdata/memprof-merge.test +++ b/llvm/test/tools/llvm-profdata/memprof-merge.test @@ -28,9 +28,10 @@ # Collect memprof profile. clang -fuse-ld=lld -Wl,--no-rosegment -gmlt -fdebug-info-for-profiling \ -fmemory-profile -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer \ - -fno-optimize-sibling-calls -m64 -Wl,-build-id source.c -o basic.memprofexe + -fno-optimize-sibling-calls -m64 -Wl,-build-id -Wl,-no-pie \ + source.c -o basic.memprofexe -env MEMPROF_OPTIONS=log_path=stdout ./rawprofile.out > basic.memprofraw +env MEMPROF_OPTIONS=log_path=stdout ./basic.memprofexe > basic.memprofraw ``` RUN: llvm-profdata merge %p/Inputs/basic.profraw %p/Inputs/basic.memprofraw --profiled-binary %p/Inputs/basic.memprofexe -o %t.prof diff --git a/llvm/test/tools/llvm-profdata/memprof-multi.test b/llvm/test/tools/llvm-profdata/memprof-multi.test --- a/llvm/test/tools/llvm-profdata/memprof-multi.test +++ b/llvm/test/tools/llvm-profdata/memprof-multi.test @@ -28,9 +28,10 @@ ``` clang -fuse-ld=lld -Wl,--no-rosegment -gmlt -fdebug-info-for-profiling \ -fmemory-profile -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer \ - -fno-optimize-sibling-calls -m64 -Wl,-build-id source.c -o multi.memprofexe + -fno-optimize-sibling-calls -m64 -Wl,-build-id -Wl,-no-pie \ + source.c -o multi.memprofexe -env MEMPROF_OPTIONS=log_path=stdout ./rawprofile.out > multi.memprofraw +env MEMPROF_OPTIONS=log_path=stdout ./multi.memprofexe > multi.memprofraw ``` RUN: llvm-profdata show --memory %p/Inputs/multi.memprofraw --profiled-binary %p/Inputs/multi.memprofexe -o - | FileCheck %s