1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/test/tools/llvm-profdata
Nathan Slingerland 6548debed0 [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
..
Inputs Add inline stack streaming to binary sample profiles. 2015-10-09 17:54:24 +00:00
c-general.test
compat.proftext
count-mismatch.proftext
gcc-gcov-sample-profile.test Re-apply r249644: Handle inline stacks in gcov-encoded sample profiles. 2015-10-08 19:40:37 +00:00
general.proftext
hash-mismatch.proftext
inline-samples.test Add inline stack streaming to binary sample profiles. 2015-10-09 17:54:24 +00:00
lit.local.cfg
multiple-inputs.test
overflow.proftext
raw-32-bits-be.test
raw-32-bits-le.test
raw-64-bits-be.test
raw-64-bits-le.test
raw-magic-but-no-header.test [llvm-profdata] Add check for text profile formats and improve error reporting (2nd try) 2015-11-13 03:47:58 +00:00
raw-two-profiles.test
sample-profile-basic.test [llvm-profdata] Add check for text profile formats and improve error reporting (2nd try) 2015-11-13 03:47:58 +00:00
text-format-errors.test [llvm-profdata] Add check for text profile formats and improve error reporting (2nd try) 2015-11-13 03:47:58 +00:00