summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ProfileData/SampleProfTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [NFC] Change sample profile format enum name SPF_Raw_Binary to SPF_Binary.Wei Mi2018-06-121-1/+1
| | | | | | | Some out-of-tree targets depend on the enum name SPF_Binary. Keep the name can avoid unnecessary churn to those targets. llvm-svn: 334476
* [SampleFDO] Add a new compact binary format for sample profile.Wei Mi2018-06-111-9/+26
| | | | | | | | | | | | | | Name table occupies a big chunk of size in current binary format sample profile. In order to reduce its size, the patch changes the sample writer/reader to save/restore MD5Hash of names in the name table. Sample annotation phase will also use MD5Hash of name to query samples accordingly. Experiment shows compact binary format can reduce the size of sample profile by 2/3 compared with binary format generally. Differential Revision: https://reviews.llvm.org/D47955 llvm-svn: 334447
* [SampleFDO] Extend SampleProfReader to handle demangled names.Wei Mi2018-03-071-0/+8
| | | | | | | | | | | | | SampleProfReader assumes function names in the profile are all mangled names. However, there are cases that few demangled names are somehow contained in the profile (usually because of debug info problems), which may trigger parsing error in SampleProfReader and cause the whole profile to be unusable. The patch extends SampleProfReader to handle profiles with demangled names, so that those profiles can still be useful. Differential revision: https://reviews.llvm.org/D44161 llvm-svn: 326905
* Remove redundant includes from unittests.Michael Zolotukhin2017-12-131-6/+0
| | | | llvm-svn: 320630
* Re-sort #include lines for unittests. This uses a slightly modifiedChandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | clang-format (https://reviews.llvm.org/D33932) to keep primary headers at the top and handle new utility headers like 'gmock' consistently with other utility headers. No other change was made. I did no manual edits, all of this is clang-format. This should allow other changes to have more clear and focused diffs, and is especially motivated by moving some headers into more focused libraries. llvm-svn: 304786
* Use the range variant of find_if instead of unpacking begin/endDavid Majnemer2016-08-121-6/+4
| | | | | | No functionality change is intended. llvm-svn: 278443
* Remove specializations of ProfileSummaryEaswaran Raman2016-05-191-13/+10
| | | | | | | | This removes the subclasses of ProfileSummary, moves the members of the derived classes to the base class. Differential Revision: http://reviews.llvm.org/D20390 llvm-svn: 270143
* Fix some Clang-tidy modernize and Include What You Use warnings.Eugene Zelenko2016-04-281-4/+18
| | | | | | Differential revision: http://reviews.llvm.org/D19673 llvm-svn: 267910
* Remove every uses of getGlobalContext() in LLVM (but the C API)Mehdi Amini2016-04-141-3/+4
| | | | | | | | | | | At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266379
* Sample profile summary cleanupEaswaran Raman2016-03-281-1/+1
| | | | | | | | Replace references to MaxHeadSamples with MaxFunctionCount Differential Revision: http://reviews.llvm.org/D18522 llvm-svn: 264686
* Interface to get/set profile summary metadata to moduleEaswaran Raman2016-03-181-0/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D17894 llvm-svn: 263835
* Fix memory leak in tests.Easwaran Raman2016-03-031-0/+1
| | | | llvm-svn: 262674
* Use LineLocation instead of CallsiteLocation to index callsite profile.Dehao Chen2016-03-031-0/+2
| | | | | | | | | | | | Summary: With discriminator, LineLocation can uniquely identify a callsite without the need to specifying callee name. Remove Callee function name from the key, and put it in the value (FunctionSamples). Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17827 llvm-svn: 262634
* Metadata support for profile summary.Easwaran Raman2016-03-011-24/+37
| | | | | | | | This adds support to convert ProfileSummary object to Metadata and create a ProfileSummary object from metadata. This would allow attaching profile summary information to Module allowing optimization passes to use it. llvm-svn: 262360
* Add profile summary support for sample profile.Easwaran Raman2016-02-191-0/+30
| | | | | | Differential Revision: http://reviews.llvm.org/D17178 llvm-svn: 261304
* [PGO] Handle and report overflow during profile merge for all types of dataNathan Slingerland2015-12-161-0/+30
| | | | | | | | | | | | Summary: Surface counter overflow when merging profile data. Merging still occurs on overflow but counts saturate to the maximum representable value. Overflow is reported to the user. Reviewers: davidxl, dnovillo, silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15547 llvm-svn: 255825
* [ProfileData] Add unit test infrastructure for sample profile reader/writerNathan Slingerland2015-12-101-0/+102
Summary: Adds support for in-memory round-trip of sample profile data along with basic round trip unit tests. This will also make it easier to include unit tests for future changes to sample profiling. Reviewers: davidxl, dnovillo, silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15211 llvm-svn: 255264
OpenPOWER on IntegriCloud