summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ProfileData
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert the revert 253497 and 253539 - These commits aren't the cause of the ↵Daniel Sanders2015-11-201-0/+32
| | | | | | | | clang-cmake-mips failures. Sorry for the noise. llvm-svn: 253662
* Revert 253497 and 253539 to try to fix clang-cmake-mips buildbot.Daniel Sanders2015-11-201-32/+0
| | | | | | | | | | It caused link errors of the form: InstrProfiling.c:(.text.__llvm_profile_instrument_target+0x1c0): undefined reference to `__sync_fetch_and_add_8' We had a network outage at the time of the commit so the first build to show a problem is http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/10827 llvm-svn: 253656
* [llvm-profdata] Add SaturatingAdd/SaturatingMultiply Helper Functions (2nd try)Nathan Slingerland2015-11-181-0/+32
| | | | | | | | | | | | | Summary: This change adds MathExtras helper functions for handling unsigned, saturating addition and multiplication. It also updates the instrumentation and sample profile merge implementations to use them. Reviewers: dnovillo, bogner, davidxl Subscribers: davidxl, llvm-commits Differential Revision: http://reviews.llvm.org/D14720 llvm-svn: 253497
* [PGO] Make indexed value profile data more compactXinliang David Li2015-11-101-1/+58
| | | | | | | | | | | | | | | | - Make indexed value profile data more compact by peeling out the per-site value count field into its own smaller sized array. - Introduced formal data structure definitions to specify value profile data layout in indexed format. Previously the layout of the data is only assumed in the client code (scattered in three different places : size computation, EmitData, and ReadData - The new data structure serves as a central place for layout documentation. - Add interfaces to force BE output for value profile data (testing purpose) - Add byte swap unit tests Differential Revision: http://reviews.llvm.org/D14401 llvm-svn: 252563
* Fix some Clang-tidy modernize warnings, other minor fixes.Eugene Zelenko2015-11-041-15/+15
| | | | | | | | Fixed warnings are: modernize-use-override, modernize-use-nullptr and modernize-redundant-void-arg. Differential revision: http://reviews.llvm.org/D14312 llvm-svn: 252087
* [PGO] Value profiling (index format) code cleanup and testingXinliang David Li2015-11-021-0/+199
| | | | | | | | | | | | | | | | | 1. Added a set of public interfaces in InstrProfRecord class to access (read/write) value profile data. 2. Changed IndexedProfile reader and writer code to use the newly defined interfaces and hide implementation details. 3. Added a couple of unittests for value profiling: - Test new interfaces to get and set value profile data - Test value profile data merging with various scenarios. No functional change is expected. The new interfaces will also make it possible to change on-disk format of value prof data to be more compact (to be submitted). llvm-svn: 251771
* InstrProf: Support for value profiling in the indexed profile formatJustin Bogner2015-09-292-10/+20
| | | | | | | | | Add support to the indexed instrprof reader and writer for the format that will be used for value profiling. Patch by Betul Buyukkurt, with minor modifications. llvm-svn: 248833
* InstrProf: Add a test for multiple copies of the same with different hashesJustin Bogner2015-06-221-0/+6
| | | | | | | | This functionality wasn't being tested. Patch by Betul Buyukkurt. llvm-svn: 240359
* InstrProf: Treat functions with a coverage map but no profile as unreachedJustin Bogner2015-05-131-0/+15
| | | | | | | | | | If we have a coverage mapping but no profile data for a function, calling it mismatched is misleading. This can just as easily be unreachable code that was stripped from the binary. Instead, treat these the same as functions where we have an explicit "zero" coverage map by setting the count to zero for each mapped region. llvm-svn: 237298
* InstrProf: Strip filename prefixes from the names we display for coverageJustin Bogner2015-05-051-0/+14
| | | | | | | For consumers of coverage data, any filename prefixes we store in the profile data are just noise. Strip this prefix if it exists. llvm-svn: 236558
* InstrProf: Don't combine expansion regions with code regionsJustin Bogner2015-02-181-0/+37
| | | | | | | | This was leading to duplicate counts when a code region happened to overlap exactly with an expansion. The combining behaviour only makes sense for code regions. llvm-svn: 229723
* InstrProf: Handle unknown functions if they consist only of zero-regionsJustin Bogner2015-02-181-0/+13
| | | | | | | | | | This comes up when we generate coverage for a function but don't end up emitting the function at all - dead static functions or inline functions that aren't referenced in a particular TU, for example. In these cases we'd like to show that the function was never called, which is trivially true. llvm-svn: 229717
* InstrProf: Make CoverageMapping testable and add a basic unit testJustin Bogner2015-02-181-0/+82
| | | | | | | | Make CoverageMapping easier to create, so that we can write targeted unit tests for its internals, and add a some infrastructure to write these tests. Finally, add a simple unit test for basic functionality. llvm-svn: 229709
* Re-apply "InstrProf: Add unit tests for the profile reader and writer"Justin Bogner2015-02-182-0/+99
| | | | | | | | | | | | | | Have the InstrProfWriter return a MemoryBuffer instead of a std::string. This fixes the alignment issues the reader would hit, and it's a more appropriate type for this anyway. I've also removed an ugly helper function that's not needed since we're allowing initializer lists now, and updated some error code checks based on MSVC's issues with r229473. This reverts r229483, reapplying r229478. llvm-svn: 229602
* Re-apply "InstrProf: Use a test fixture in the coverage mapping tests"Justin Bogner2015-02-171-67/+81
| | | | | | | | | | This time we use a helper to format the assertion so we can just use ASSERT_TRUE instead of relying on ASSERT_EQ being able to deal with conversions between enum types. This reverts r229496, re-applying r229473. llvm-svn: 229547
* Reverting r229473; it does not compile with MSVC 2013, and I suspect it was ↵Aaron Ballman2015-02-171-77/+69
| | | | | | meant to be reverted in r229483. llvm-svn: 229496
* Revert "InstrProf: Add unit tests for the profile reader and writer"Justin Bogner2015-02-172-98/+0
| | | | | | | | | | This added API to the InstrProfWriter to write to a string so I could write unittests without using temp files. This doesn't really work, since the format has tighter alignment requirements than a char. This reverts r229478 and its follow-up, r229481. llvm-svn: 229483
* InstrProf: Add missing header from r229478Justin Bogner2015-02-171-0/+2
| | | | llvm-svn: 229481
* Re-apply "InstrProf: Add unit tests for the profile reader and writer"Justin Bogner2015-02-172-0/+96
| | | | | | | | Add these tests again, but use va_list instead of initializer lists. This reverts r229456, reapplying r229455. llvm-svn: 229478
* InstrProf: Use a test fixture in the coverage mapping testsJustin Bogner2015-02-171-69/+77
| | | | llvm-svn: 229473
* Revert "InstrProf: Add unit tests for the profile reader and writer"Justin Bogner2015-02-162-89/+0
| | | | | | | | Looks like the bots don't like my initializer lists. This reverts r229455 llvm-svn: 229456
* InstrProf: Add unit tests for the profile reader and writerJustin Bogner2015-02-162-0/+89
| | | | | | | | | | This required some minor API to be added to these types to avoid needing temp files. Also, I've used initializer lists in the tests, as MSVC 2013 claims to support them. I'll redo this without them if the bots complain. llvm-svn: 229455
* InstrProf: Avoid using std::to_stringJustin Bogner2015-02-051-2/+4
| | | | | | | | | Apparently std::to_string doesn't exist in mingw32: http://lab.llvm.org:8011/builders/clang-native-mingw32-win7/builds/7990 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015 llvm-svn: 228340
* InstrProf: std::to_string needs to #include <string>Justin Bogner2015-02-041-0/+2
| | | | llvm-svn: 228136
* InstrProf: Add some unit tests for CoverageMappingJustin Bogner2015-02-043-0/+136
The llvm-level tests for coverage mapping need a binary input file, which means they're hard to understand, hard to update, and it's difficult to add new ones. By adding some unit tests that build up the coverage data structures in C++, we can write more meaningful and targeted tests. llvm-svn: 228084
OpenPOWER on IntegriCloud