llvm-project/llvm/test
Nathan Slingerland 4f82366759 [llvm-profdata] Add check for text profile formats and improve error reporting (2nd try)
Summary:
This change addresses two possible instances of user error / confusion when
merging sampled profile data.

Previously any input that didn't match the raw or processed instrumented format
would automatically be interpreted as instrumented profile text format data.
No error would be reported during the merge.

Example:
If foo-sampled.profdata and bar-sampled.profdata are binary sampled profiles:

Old behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -output foobar-sampled.profdata
$ llvm-profdata show -sample foobar-sampled.profdata
error: foobar-sampled.profdata:1: Expected 'mangled_name:NUM:NUM', found  lprofi

This change adds basic checks for valid input data when assuming text input.
It also makes error messages related to file format validity more specific about
the assumbed profile data type.

New behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -o foobar-sampled.profdata
error: foo.profdata: Unrecognized instrumentation profile encoding format
Perhaps you forgot to use the -sample option?

Reviewers: bogner, davidxl, dnovillo

Subscribers: davidxl, llvm-commits

Differential Revision: http://reviews.llvm.org/D14558

llvm-svn: 253009
2015-11-13 03:47:58 +00:00
..
Analysis Revert "Revert "[FunctionAttrs] Identify norecurse functions"" 2015-11-12 10:55:20 +00:00
Assembler [IR] Add support for empty tokens 2015-11-11 21:57:16 +00:00
Bindings Add a new attribute: norecurse 2015-11-06 10:32:53 +00:00
Bitcode Sort the enums in Attributes.h in case insensitive alphabetical order. 2015-11-11 02:11:46 +00:00
BugPoint [bugpoint] Add a named metadata (+their operands) reducer 2015-11-06 00:12:50 +00:00
CodeGen [WebAssembly] Inline asm support. 2015-11-13 01:42:29 +00:00
DebugInfo Re-apply "[mips] Use correct frame register for DWARF info when dynamically realigning the stack."" 2015-11-12 14:11:43 +00:00
Examples Disable llvm/test/Examples/ for now while investigating. 2015-08-28 03:32:43 +00:00
ExecutionEngine [RuntimeDyld] Add support for R_X86_64_PC8 relocation. 2015-11-08 19:34:17 +00:00
Feature [FunctionAttrs] Add handling for operand bundles 2015-11-07 01:56:00 +00:00
FileCheck
Instrumentation [ASan] Enable optional ASan recovery. 2015-11-11 10:36:49 +00:00
Integer
JitListener DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
LTO Add a libLTO diagnostic handler that supports lto_get_error_message API 2015-11-11 19:59:08 +00:00
LibDriver
Linker [ThinLTO] Update test to be more tolerant of ordering changes 2015-11-12 19:31:46 +00:00
MC [Hexagon] NFC. Adding a number of packet correctness tests. 2015-11-13 01:46:06 +00:00
Object Tests: be slightly more specific to avoid conflict with path. 2015-10-26 13:40:03 +00:00
Other Make the default triple optional by allowing an empty string 2015-09-16 05:34:32 +00:00
SymbolRewriter [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
TableGen [TableGen] Allow TokenTy in intrinsic signatures 2015-09-02 13:36:25 +00:00
Transforms [llvm-profdata] Add check for text profile formats and improve error reporting (2nd try) 2015-11-13 03:47:58 +00:00
Unit
Verifier Introduce deoptimization operand bundles 2015-11-11 21:38:02 +00:00
YAMLParser
tools [llvm-profdata] Add check for text profile formats and improve error reporting (2nd try) 2015-11-13 03:47:58 +00:00
.clang-format
CMakeLists.txt sancov test suite 2015-11-12 19:34:21 +00:00
Makefile Add a way to skip the Go bindings tests even when Go is configured in 2015-09-10 05:47:43 +00:00
Makefile.tests
TestRunner.sh
lit.cfg Suppress LLVM::tools/llvm-symbolizer/coff-dwarf.test for mingw, for now. 2015-10-10 02:57:02 +00:00
lit.site.cfg.in Add a way to skip the Go bindings tests even when Go is configured in 2015-09-10 05:47:43 +00:00