diff options
author | Wei Mi <wmi@google.com> | 2019-08-23 19:05:30 +0000 |
---|---|---|
committer | Wei Mi <wmi@google.com> | 2019-08-23 19:05:30 +0000 |
commit | be9073249e346759f39ca90cb1df80c3b02ca41c (patch) | |
tree | 7f4eb9931134294bb233bf7749e1be76d982059a /llvm/unittests/ProfileData | |
parent | b4051e57b104d17ed4f5be21e3c54f80d170b97f (diff) | |
download | bcm5719-llvm-be9073249e346759f39ca90cb1df80c3b02ca41c.tar.gz bcm5719-llvm-be9073249e346759f39ca90cb1df80c3b02ca41c.zip |
[SampleFDO] Add ExtBinary format to support extension of binary profile.
This is a patch split from https://reviews.llvm.org/D66374. It tries to add
a new format of profile called ExtBinary. The format adds a section header
table to the profile and organize the profile in sections, so the future
extension like adding a new section or extending an existing section will be
easier while keeping backward compatiblity feasible.
Differential Revision: https://reviews.llvm.org/D66513
llvm-svn: 369798
Diffstat (limited to 'llvm/unittests/ProfileData')
-rw-r--r-- | llvm/unittests/ProfileData/SampleProfTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/unittests/ProfileData/SampleProfTest.cpp b/llvm/unittests/ProfileData/SampleProfTest.cpp index 450dcd02346..a28a1d8a1aa 100644 --- a/llvm/unittests/ProfileData/SampleProfTest.cpp +++ b/llvm/unittests/ProfileData/SampleProfTest.cpp @@ -285,6 +285,10 @@ TEST_F(SampleProfTest, roundtrip_compact_binary_profile) { testRoundTrip(SampleProfileFormat::SPF_Compact_Binary, false); } +TEST_F(SampleProfTest, roundtrip_ext_binary_profile) { + testRoundTrip(SampleProfileFormat::SPF_Ext_Binary, false); +} + TEST_F(SampleProfTest, remap_text_profile) { testRoundTrip(SampleProfileFormat::SPF_Text, true); } @@ -293,6 +297,10 @@ TEST_F(SampleProfTest, remap_raw_binary_profile) { testRoundTrip(SampleProfileFormat::SPF_Binary, true); } +TEST_F(SampleProfTest, remap_ext_binary_profile) { + testRoundTrip(SampleProfileFormat::SPF_Ext_Binary, true); +} + TEST_F(SampleProfTest, sample_overflow_saturation) { const uint64_t Max = std::numeric_limits<uint64_t>::max(); sampleprof_error Result; |