Add show and merge tools for sample PGO profiles.
authorDiego Novillo <dnovillo@google.com>
Sat, 1 Nov 2014 00:56:55 +0000 (00:56 +0000)
committerDiego Novillo <dnovillo@google.com>
Sat, 1 Nov 2014 00:56:55 +0000 (00:56 +0000)
commit9657de5f228505bc17c68ce15e0c9215456a71fa
tree46634107f0e9d24d1e9134347b5e87d04e0d4142
parente542d91ee58918e0933a4a1f74cfa19ffcce500f
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221032 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/SampleProf.h
include/llvm/ProfileData/SampleProfReader.h
include/llvm/ProfileData/SampleProfWriter.h
lib/ProfileData/SampleProf.cpp
lib/ProfileData/SampleProfReader.cpp
lib/ProfileData/SampleProfWriter.cpp
test/tools/llvm-profdata/Inputs/sample-profile.proftext [new file with mode: 0644]
test/tools/llvm-profdata/sample-profile-basic.test [new file with mode: 0644]
tools/llvm-profdata/llvm-profdata.cpp