Add show and merge tools for sample PGO profiles.

Summary:
This patch extends the 'show' and 'merge' commands in llvm-profdata to handle
sample PGO formats. Using the 'merge' command it is now possible to convert
one sample PGO format to another.

The only format that is currently not working is 'gcc'. I still need to
implement support for it in lib/ProfileData.

The changes in the sample profile support classes are needed for the
merge operation.

Reviewers: bogner

Subscribers: llvm-commits

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

llvm-svn: 221032
This commit is contained in:
Diego Novillo
2014-11-01 00:56:55 +00:00
parent a33cd6aa27
commit d5336ae269
9 changed files with 323 additions and 123 deletions

View File

@@ -36,6 +36,8 @@ class SampleProfErrorCategoryType : public std::error_category {
return "Truncated profile data";
case sampleprof_error::malformed:
return "Malformed profile data";
case sampleprof_error::unrecognized_format:
return "Unrecognized profile encoding format";
}
llvm_unreachable("A value of sampleprof_error has no message.");
}