summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata/binary.test
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-03-21 18:26:05 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-03-21 18:26:05 +0000
commit24b4b6533925e6dbd0faef7976c7f794499e0ec6 (patch)
tree205636d9f9b574584985d0583ae6506b8a9bfcfd /llvm/test/tools/llvm-profdata/binary.test
parent76e8731b09f1ca6a05001060a00b1b1a77d1dc4a (diff)
downloadbcm5719-llvm-24b4b6533925e6dbd0faef7976c7f794499e0ec6.tar.gz
bcm5719-llvm-24b4b6533925e6dbd0faef7976c7f794499e0ec6.zip
InstrProf: Read raw binary profile in llvm-profdata
Read a raw binary profile that corresponds to a memory dump from the runtime profile. The test is a binary file generated from cfe/trunk/test/Profile/c-general.c with the new compiler-rt runtime and the matching text version of the input. It includes instructions on how to regenerate. <rdar://problem/15950346> llvm-svn: 204496
Diffstat (limited to 'llvm/test/tools/llvm-profdata/binary.test')
-rw-r--r--llvm/test/tools/llvm-profdata/binary.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-profdata/binary.test b/llvm/test/tools/llvm-profdata/binary.test
new file mode 100644
index 00000000000..d3a1c3fae09
--- /dev/null
+++ b/llvm/test/tools/llvm-profdata/binary.test
@@ -0,0 +1,15 @@
+REGENERATE: You need a checkout of clang with compiler-rt to generate the
+REGENERATE: binary file here. These shell commands can be used to regenerate
+REGENERATE: it.
+REGENERATE:
+REGENERATE: $ SRC=path/to/llvm
+REGENERATE: $ CFE=$SRC/tools/clang
+REGENERATE: $ TESTDIR=$SRC/test/tools/llvm-profdata
+REGENERATE: $ CFE_TESTDIR=$CFE/test/Profile
+REGENERATE: $ clang -o a.out -fprofile-instr-generate $CFE_TESTDIR/test/Profile/c-general.c
+REGENERATE: $ LLVM_PROFILE_FILE=$TESTDIR/Inputs/binary.profdata ./a.out
+REGENERATE: $ cp $CFE_TESTDIR/Inputs/c-general.profdata $TESTDIR/Inputs/binary-compare.profdata
+
+RUN: llvm-profdata show %p/Inputs/binary.profdata -o %t1
+RUN: llvm-profdata show %p/Inputs/binary-compare.profdata -o %t2
+RUN: diff -up %t1 %t2
OpenPOWER on IntegriCloud