summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata/errors.test
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-02-17 23:22:49 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-02-17 23:22:49 +0000
commit846a627f5ca4cc72d4256c3b6b2051a49e13eb89 (patch)
tree35c756f4b20a469e2cd9fd4f5ba1f60ade11c66d /llvm/test/tools/llvm-profdata/errors.test
parent551365da338bb7ef54943cb7e10cf595524d2ff9 (diff)
downloadbcm5719-llvm-846a627f5ca4cc72d4256c3b6b2051a49e13eb89.tar.gz
bcm5719-llvm-846a627f5ca4cc72d4256c3b6b2051a49e13eb89.zip
PGO: llvm-profdata: tool for merging profiles
Introducing llvm-profdata, a tool for merging profile data generated by PGO instrumentation in clang. - The name indicates a file extension of <name>.profdata. Eventually profile data output by clang should be changed to that extension. - llvm-profdata merges two profiles. However, the name is more general, since it will likely pick up more tasks (such as summarizing a single profile). - llvm-profdata parses the current text-based format, but will be updated once we settle on a binary format. <rdar://problem/15949645> llvm-svn: 201535
Diffstat (limited to 'llvm/test/tools/llvm-profdata/errors.test')
-rw-r--r--llvm/test/tools/llvm-profdata/errors.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-profdata/errors.test b/llvm/test/tools/llvm-profdata/errors.test
new file mode 100644
index 00000000000..6335ea95f9e
--- /dev/null
+++ b/llvm/test/tools/llvm-profdata/errors.test
@@ -0,0 +1,22 @@
+RUN: not llvm-profdata %p/Inputs/empty.profdata %p/Inputs/foo3-1.profdata 2>&1 | FileCheck %s --check-prefix=LENGTH
+RUN: not llvm-profdata %p/Inputs/foo3-1.profdata %p/Inputs/foo3bar3-1.profdata 2>&1 | FileCheck %s --check-prefix=LENGTH
+RUN: not llvm-profdata %p/Inputs/foo4-1.profdata %p/Inputs/empty.profdata 2>&1 | FileCheck %s --check-prefix=LENGTH
+LENGTH: error: {{.*}}: truncated file
+
+RUN: not llvm-profdata %p/Inputs/foo3-1.profdata %p/Inputs/bar3-1.profdata 2>&1 | FileCheck %s --check-prefix=NAME
+NAME: error: {{.*}}: function name mismatch
+
+RUN: not llvm-profdata %p/Inputs/foo3-1.profdata %p/Inputs/foo4-1.profdata 2>&1 | FileCheck %s --check-prefix=COUNT
+COUNT: error: {{.*}}: function count mismatch
+
+RUN: not llvm-profdata %p/Inputs/overflow.profdata %p/Inputs/overflow.profdata 2>&1 | FileCheck %s --check-prefix=OVERFLOW
+OVERFLOW: error: {{.*}}: counter overflow
+
+RUN: not llvm-profdata %p/Inputs/invalid-count-later.profdata %p/Inputs/invalid-count-later.profdata 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER
+INVALID-COUNT-LATER: error: {{.*}}: invalid counter
+
+RUN: not llvm-profdata %p/Inputs/bad-function-count.profdata %p/Inputs/bad-function-count.profdata 2>&1 | FileCheck %s --check-prefix=BAD-FUNCTION-COUNT
+BAD-FUNCTION-COUNT: error: {{.*}}: bad function count
+
+RUN: not llvm-profdata %p/Inputs/three-words-long.profdata %p/Inputs/three-words-long.profdata 2>&1 | FileCheck %s --check-prefix=INVALID-DATA
+INVALID-DATA: error: {{.*}}: invalid data
OpenPOWER on IntegriCloud