[compiler-rt] f343253 - Use llvm-profdata to test indexed profile in instrprof-binary-correlate.c

Zequan Wu via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 13:58:53 PST 2023


Author: Zequan Wu
Date: 2023-12-14T16:58:46-05:00
New Revision: f34325307eb36d6032ccea3773e3e0c1746b7f98

URL: https://github.com/llvm/llvm-project/commit/f34325307eb36d6032ccea3773e3e0c1746b7f98
DIFF: https://github.com/llvm/llvm-project/commit/f34325307eb36d6032ccea3773e3e0c1746b7f98.diff

LOG: Use llvm-profdata to test indexed profile in instrprof-binary-correlate.c

Added: 
    

Modified: 
    compiler-rt/test/profile/instrprof-binary-correlate.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/profile/instrprof-binary-correlate.c b/compiler-rt/test/profile/instrprof-binary-correlate.c
index 8f421014cf5c9f..c6dedde2865e18 100644
--- a/compiler-rt/test/profile/instrprof-binary-correlate.c
+++ b/compiler-rt/test/profile/instrprof-binary-correlate.c
@@ -12,7 +12,7 @@
 // RUN: llvm-profdata merge -o %t-1.profdata --binary-file=%t-1.exe %t-1.profraw
 // RUN: llvm-cov report --instr-profile=%t-1.profdata %t-1.exe > %t-1.report
 // RUN: llvm-cov show --instr-profile=%t-1.profdata %t-1.exe > %t-1.show
-// RUN: 
diff  %t.normal.profdata %t-1.profdata
+// RUN: 
diff  <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t-1.profdata)
 // RUN: 
diff  %t.normal.report %t-1.report
 // RUN: 
diff  %t.normal.show %t-1.show
 
@@ -22,7 +22,7 @@
 // RUN: llvm-profdata merge -o %t-2.profdata --binary-file=%t-1.exe %t-2.profraw
 // RUN: llvm-cov report --instr-profile=%t-2.profdata %t-1.exe > %t-2.report
 // RUN: llvm-cov show --instr-profile=%t-2.profdata %t-1.exe > %t-2.show
-// RUN: 
diff  %t.normal.profdata %t-2.profdata
+// RUN: 
diff  <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t-2.profdata)
 // RUN: 
diff  %t.normal.report %t-2.report
 // RUN: 
diff  %t.normal.show %t-2.show
 
@@ -39,7 +39,7 @@
 // RUN: llvm-profdata merge -o %t-4.profdata --binary-file=%t-1.exe  %t.profdir
 // RUN: llvm-cov report --instr-profile=%t-4.profdata %t-1.exe > %t-4.report
 // RUN: llvm-cov show --instr-profile=%t-4.profdata %t-1.exe > %t-4.show
-// RUN: 
diff  %t.normal.merged.profdata %t-4.profdata
+// RUN: 
diff  <(llvm-profdata show --all-functions --counts %t.normal.merged.profdata) <(llvm-profdata show --all-functions --counts %t-4.profdata)
 // RUN: 
diff  %t.normal.merged.report %t-4.report
 // RUN: 
diff  %t.normal.merged.show %t-4.show
 


        


More information about the llvm-commits mailing list