llvm/test/tools
Nathan Slingerland 7b81b822ba [llvm-profdata] Add check for text profile formats and improve error reporting
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252916 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-12 18:06:18 +00:00
..
dsymutil dsymutil: Prune module forward decl DIEs if a uniquable definition was 2015-11-10 21:31:05 +00:00
gold Support for llvm-bcanalyzer dumping of record array strings. 2015-10-08 15:56:24 +00:00
llvm-cov InstrProf: Fix display of large numbers in llvm-cov 2015-05-13 22:41:48 +00:00
llvm-cxxdump [llvm-cxxdump] Remove duplicate code check. 2015-09-15 23:35:32 +00:00
llvm-lit [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
llvm-lto Fix windows bot failures from r250699 by removing "/" from expected path 2015-10-19 15:19:02 +00:00
llvm-mc [Hexagon] Removing XFAIL on Hexagon target. 2015-11-09 06:15:55 +00:00
llvm-nm Fix llvm-nm(1) printing of llvm-bitcode files for -format darwin to match darwin’s nm(1). 2015-11-10 00:31:08 +00:00
llvm-objdump [Object, MachO] Mark symbols from DATA and BSS sections as ST_Data 2015-11-12 09:40:29 +00:00
llvm-pdbdump [llvm-pdbdump] Add include-only filters. 2015-09-29 19:49:06 +00:00
llvm-profdata [llvm-profdata] Add check for text profile formats and improve error reporting 2015-11-12 18:06:18 +00:00
llvm-readobj [llvm-readobj] Teach ELFDumper about symbol versioning. 2015-10-16 23:19:01 +00:00
llvm-size [llvm-size] Attempt to fix a test failure on Windows. 2015-10-03 20:20:28 +00:00
llvm-split [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
llvm-symbolizer [Symbolizer]: Add -pretty-print option 2015-11-11 20:41:43 +00:00
lto Update test suite to make "ninja check" succeed without native backend builtin 2015-08-04 06:32:54 +00:00