Go to file
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
clang [CMake] If 'INTERNAL_INSTALL_PREFIX' is set, use it for determining the install destination of c-index-test and the libclang headers. 2015-11-13 01:46:18 +00:00
clang-tools-extra Fix bug in suggested fix that truncated variable names to 1 character. 2015-11-11 18:40:36 +00:00
compiler-rt compiler-rt: add make solution to bootstrap mingw-w64 2015-11-13 00:21:34 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc integer: remove explicit casts from _MIN definitions 2015-10-06 19:12:12 +00:00
libcxx Implement P0074: Making owner_less more flexible 2015-11-12 15:56:44 +00:00
libcxxabi Fix LIBCXXABI_HAS_NO_THREADS configuration. 2015-10-14 19:21:38 +00:00
libunwind Make it possible to use libunwind without heap. 2015-11-09 06:57:29 +00:00
lld [ELF2/AArch64] Add support for R_AARCH64_CALL26 and R_AARCH64_JUMP26. 2015-11-13 03:26:59 +00:00
lldb Fix commit 252963 to work around a bug on some platforms where they don't 2015-11-13 03:37:48 +00:00
llgo debug: Update for debug info API change. 2015-11-05 22:04:20 +00:00
llvm [llvm-profdata] Add check for text profile formats and improve error reporting (2nd try) 2015-11-13 03:47:58 +00:00
openmp Add debug trace message for hierarchical barrier 2015-11-12 21:40:39 +00:00
polly [FIX] Bail if access function is not divisible by element size. 2015-11-12 20:15:32 +00:00