summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-profdata] Report if profile data file is IR- or FE-levelAdam Nemet2017-11-141-0/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D39997 llvm-svn: 318159
* [ProfileData] Fix data racing in merging indexed profilesRong Xu2017-10-052-0/+117
| | | | | | | | | | There is data racing to the static variable RecordIndex in index profile reader when merging in multiple threads. Make it a member variable in IndexedInstrProfReader to fix this. Differential Revision: https://reviews.llvm.org/D38431 llvm-svn: 314990
* Fix the bug when SampleProfileWriter writes out number of callsites.Dehao Chen2017-08-031-0/+4
| | | | | | | | | | | | | | Summary: As we support multiple callsites for the same location, we need to traverse all locations to get the number of callsites. Reviewers: davidxl Reviewed By: davidxl Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D36246 llvm-svn: 309907
* Commit missing/empty test file from r308789David Blaikie2017-07-221-0/+0
| | | | llvm-svn: 308814
* [ProfData] Detect if zlib is availableDavid Blaikie2017-07-212-0/+15
| | | | | | | | | | | | As discussed on [1], if the profile is compressed and llvm-profdata is not built with zlib support, the error message is not informative. Give a better error message if zlib is not available. [1] http://lists.llvm.org/pipermail/llvm-dev/2017-July/115571.html Reviewers: davidxl, dblaikie Differential Revision: https://reviews.llvm.org/D35586 llvm-svn: 308789
* Remove unnecessary prefix from comment lines in a .test file.David Blaikie2017-07-201-10/+9
| | | | llvm-svn: 308636
* [ProfileData] Add new option to dump topn hottest functionsXinliang David Li2017-07-111-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D35155 llvm-svn: 307702
* Fix a couple of typos in memory intrinsic optimization output (NFC)Teresa Johnson2017-05-241-1/+1
| | | | | | s/instrinsic/intrinsic llvm-svn: 303782
* Change sample profile writer to make it deterministic.Dehao Chen2017-05-111-3/+4
| | | | | | | | | | | | | | Summary: This patch changes the function profile output order to be deterministic. In order to make it easier to understand, hottest functions (with most total samples) is ordered first. Reviewers: dnovillo, davidxl Reviewed By: dnovillo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33111 llvm-svn: 302851
* [sampleprof] Drop test dependency on the string hash func (NFC)Vedant Kumar2017-04-263-72/+72
| | | | | | | | | | | | | | The SampleProfWriter emits function information in an order determined by the string hash function. The situation is a bit brittle, because changing the hash function can break the tests. Instead of sorting the function samples to get a relaible ordering (that might be too expensive), make the tests not depend on a particular ordering of function samples. Differential Revision: https://reviews.llvm.org/D32516 llvm-svn: 301419
* [PGO] Add omitted test cases.Rong Xu2017-03-171-0/+123
| | | | llvm-svn: 298115
* [PGO] Refactor profile dumping function for ease of adding other profile kindRong Xu2017-03-091-8/+8
| | | | | | | | Refactor the dumping function so that we can add other value profile kind easily. Differential Revision: https://reviews.llvm.org/D30752 llvm-svn: 297399
* [PGO] Text format profile reader needs to clear the value profileRong Xu2017-03-031-0/+9
| | | | | | | | | | | | | | | | Summary: Reset the ValueData for each function to avoid using the ones in the previous function. Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits, xur Differential Revision: https://reviews.llvm.org/D30479 llvm-svn: 296916
* [PGO] Fix bogus warning for merging empty llvm profile fileRong Xu2016-10-193-0/+34
| | | | | | | | | | | | | | | | | Profile runtime can generate an empty raw profile (when there is no function in the shared library). This empty profile is treated as a text format profile. A test format profile without the flag of "#IR" is thought to be a clang generated profile. So in llvm profile merging, we will get a bogus warning of "Merge IR generated profile with Clang generated profile." The fix here is to skip the empty profile (when the buffer size is 0) for profile merge. Reviewers: vsk, davidxl Differential Revision: http://reviews.llvm.org/D25687 llvm-svn: 284659
* [Profile] dump ic value profile value/site-count histogramXinliang David Li2016-09-201-0/+3
| | | | | | Differential Revision: http://reviews.google.com/D24783 llvm-svn: 282017
* [llvm-profdata] Bring back reading profile data from STDIN.Benjamin Kramer2016-07-221-0/+1
| | | | | | This feature was lost in r276197. llvm-svn: 276407
* Fix test failure on WinXinliang David Li2016-07-201-5/+5
| | | | llvm-svn: 276202
* Reapply r276185Xinliang David Li2016-07-202-8/+32
| | | | | | Fix the test case that should not depend on dir iteration order. llvm-svn: 276197
* Revert r276185 -- build bot failure Xinliang David Li2016-07-202-32/+8
| | | | llvm-svn: 276194
* [Profile] support directory reading in profile mergingXinliang David Li2016-07-202-8/+32
| | | | | | Differential Revision: http://reviews.llvm.org/D22560 llvm-svn: 276185
* Retry: [llvm-profdata] Speed up merging by using a thread poolVedant Kumar2016-07-191-0/+40
| | | | | | | | | | | | | | | | | | | | | Add a "-j" option to llvm-profdata to control the number of threads used. Auto-detect NumThreads when it isn't specified, and avoid spawning threads when they wouldn't be beneficial. I tested this patch using a raw profile produced by clang (147MB). Here is the time taken to merge 4 copies together on my laptop: No thread pool: 112.87s user 5.92s system 97% cpu 2:01.08 total With 2 threads: 134.99s user 26.54s system 164% cpu 1:33.31 total Changes since the initial commit: - When handling odd-length inputs, call ThreadPool::wait() before merging the last profile. Should fix a race/off-by-one (see r275937). Differential Revision: https://reviews.llvm.org/D22438 llvm-svn: 275938
* Revert "[llvm-profdata] Speed up merging by using a thread pool"Vedant Kumar2016-07-191-40/+0
| | | | | | | | | | | This reverts commit r275921. It broke the ppc64be bot: http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/3537 I'm not sure why it broke, but based on the output, it looks like an off-by-one (one profile left un-merged). llvm-svn: 275937
* [llvm-profdata] Speed up merging by using a thread poolVedant Kumar2016-07-181-0/+40
| | | | | | | | | | | | | | | | Add a "-j" option to llvm-profdata to control the number of threads used. Auto-detect NumThreads when it isn't specified, and avoid spawning threads when they wouldn't be beneficial. I tested this patch using a raw profile produced by clang (147MB). Here is the time taken to merge 4 copies together on my laptop: No thread pool: 112.87s user 5.92s system 97% cpu 2:01.08 total With 2 threads: 134.99s user 26.54s system 164% cpu 1:33.31 total Differential Revision: https://reviews.llvm.org/D22438 llvm-svn: 275921
* Retry^4 "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar2016-06-071-0/+17
| | | | | | | | | | Changes since the initial commit: - Use echo instead of printf. This should side-step the character escaping issues on Windows. Differential Revision: http://reviews.llvm.org/D20980 llvm-svn: 272068
* Revert "Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file""Vedant Kumar2016-06-061-16/+0
| | | | | | | | | This reverts commit r271953. It's still breaking on Windows, though the list initialization issue is fixed: http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/3751 llvm-svn: 271963
* Retry^2 "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar2016-06-061-0/+16
| | | | | | | | | | | | | Changes since the initial commit: - Normalize file paths read from the file to prevent Windows path separators from escaping parts of the path. - Since we need to store the normalized file paths in WeightedFile, don't do tricky things to keep the source MemoryBuffer alive. - Don't use list-initialization for a std::string in WeightedFile. Differential Revision: http://reviews.llvm.org/D20980 llvm-svn: 271953
* Revert "Retry "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar2016-06-061-16/+0
| | | | | | | | This reverts commit r271949. It breaks the Windows build: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/12796 llvm-svn: 271952
* Retry "[llvm-profdata] Add option to ingest filepaths from a file"Vedant Kumar2016-06-061-0/+16
| | | | | | | | | | | | Changes since the initial commit: - Normalize file paths read from the file to prevent Windows path separators from escaping parts of the path. - Since we need to store the normalized file paths in WeightedFile, don't do tricky things to keep the source MemoryBuffer alive. Differential Revision: http://reviews.llvm.org/D20980 llvm-svn: 271949
* [llvm-profdata] Revert r271709 and the 3 subsequent commits - the codeChandler Carruth2016-06-041-16/+0
| | | | | | | | | | | | | | | | | | | | and/or tests aren't working on Windows currently. There seems to be some problem with quoting the file paths. I don't understand the test structure here or the code well enough to try to come up with a way to correctly handle paths with back slashes in them, and this has caused the Windows builds to be failing for 7 hours now, so I'm reverting the whole thing to bring them back to life. Sorry for the disruption, but a couple of these were bug fixes anyways that can be folded into a fresh commit. Reverts the following patches: r271756: Clean up the way we create the input filenames buffer (NFC) r271748: Fix use-after-free from discarded MemoryBuffer (NFC) r271710: Fix option description (NFC) r271709: Add option to ingest filepaths from a file llvm-svn: 271760
* [llvm-profdata] Add option to ingest filepaths from a fileVedant Kumar2016-06-031-0/+16
| | | | | | Differential Revision: http://reviews.llvm.org/D20980 llvm-svn: 271709
* [profile] show more statisticsXinliang David Li2016-05-231-2/+8
| | | | | | Add value profile statistics with the 'show' command. llvm-svn: 270450
* [profile] Remove another unneeded field in raw profile readerXinliang David Li2016-05-066-6/+0
| | | | | | | DataValueSize is now removed. The change is consolidated with previous raw version bump. llvm-svn: 268703
* [Profile] Raw profile header clean upXinliang David Li2016-05-056-12/+6
| | | | | | Remove dead ValueDataBegin field in raw header. llvm-svn: 268602
* [LLVM] Remove unwanted --check-prefix=CHECK from unit tests. NFC.Mandeep Singh Grang2016-04-191-1/+1
| | | | | | | | | | | | Summary: Removed unwanted --check-prefix=CHECK from numerous unit tests. Reviewers: t.p.northover, dblaikie, uweigand, MatzeB, tstellarAMD, mcrosier Subscribers: mcrosier, dsanders Differential Revision: http://reviews.llvm.org/D19279 llvm-svn: 266834
* Reapply (2x) "[PGO] Fix name encoding for ObjC-like functions"Vedant Kumar2016-03-285-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Function names in ObjC can have spaces in them. This interacts poorly with name compression, which uses spaces to separate PGO names. Fix the issue by using a different separator and update a test. I chose "\01" as the separator because 1) it's non-printable, 2) we strip it from PGO names, and 3) it's the next natural choice once "\00" is discarded (that one's overloaded). What's changed since the original commit? - I fixed up the covmap-V2 binary format tests using a linux VM. - I weakened the CHECK lines in instrprof-comdat.h to account for the fact that there have been bugfixes to clang coverage. These will be fixed up in a follow-up. - I added an assert to make sure we don't get bitten by this again. - I constructed the c-general.profraw file without name compression enabled to appease some bots. Differential Revision: http://reviews.llvm.org/D18516 llvm-svn: 264658
* Revert "Reapply "[PGO] Fix name encoding for ObjC-like functions""Vedant Kumar2016-03-285-4/+4
| | | | | | | This reverts commit r264641 to investigate why c-general.test is failing on the bots. llvm-svn: 264643
* Reapply "[PGO] Fix name encoding for ObjC-like functions"Vedant Kumar2016-03-285-4/+4
| | | | | | | | | | | | | | | | | | | | | Function names in ObjC can have spaces in them. This interacts poorly with name compression, which uses spaces to separate PGO names. Fix the issue by using a different separator and update a test. I chose "\01" as the separator because 1) it's non-printable, 2) we strip it from PGO names, and 3) it's the next natural choice once "\00" is discarded (that one's overloaded). This reverts the revert commit beaf3d18. What's changed? - I fixed up the covmap-V2 binary format tests using a linux VM. - I updated the expected counts in instrprof-comdat.h to account for the fact that there have been bugfixes to clang coverage. - I added an assert to make sure we don't get bitten by this again. Differential Revision: http://reviews.llvm.org/D18516 llvm-svn: 264641
* Stop testing the unspecified order in which the OnDiskHashTable stores entries.Richard Smith2016-03-263-57/+71
| | | | llvm-svn: 264487
* Revert r260064, "Disable llvm/test/tools/llvm-profdata/value-prof.proftext ↵NAKAMURA Takumi2016-02-251-2/+0
| | | | | | | | on win32 for now. Investigating." It seems unreproducible any more for me. llvm-svn: 261842
* Fix build bot failure Xinliang David Li2016-02-081-0/+0
| | | | llvm-svn: 260138
* [PGO] Enable compression in pgo instrumentationXinliang David Li2016-02-086-55/+39
| | | | | | | | | | | | This reduces sizes of instrumented object files, final binaries, process images, and raw profile data. The format of the indexed profile data remain the same. Differential Revision: http://reviews.llvm.org/D16388 llvm-svn: 260117
* Disable llvm/test/tools/llvm-profdata/value-prof.proftext on win32 for now. ↵NAKAMURA Takumi2016-02-071-0/+2
| | | | | | Investigating. llvm-svn: 260064
* Add a compatibility testXinliang David Li2016-02-032-1/+22
| | | | llvm-svn: 259632
* [Profiling] Add a -sparse mode to llvm-profdata mergeVedant Kumar2016-01-291-7/+11
| | | | | | | | | | Add an option to llvm-profdata merge for writing out sparse indexed profiles. These profiles omit InstrProfRecords for functions which are never executed. Differential Revision: http://reviews.llvm.org/D16727 llvm-svn: 259258
* [PGO] fix a bug in profile summary computationXinliang David Li2016-01-161-13/+13
| | | | | | | | Entry block count was not counted and is corrected. Also introduce a new metric that is MaxInternalBlockCount which show command shows (as before). llvm-svn: 257987
* Display detailed profile summary in llvm-profdata tool.Easwaran Raman2016-01-131-0/+20
| | | | | | | | | | | This adds a detailed profile summary in llvm-profdata. The summary is in the form of one or more triples of the form (P, N, M) which is interpreted as if we look at the Top-N counts in the profile, their sum accounts for P percentage of the sum of all counts in the program and the minimum count in the Top-N is M. Differential Revision: http://reviews.llvm.org/D16005 llvm-svn: 257680
* [PGO] Ensure vp data in indexed profile always sortedXinliang David Li2016-01-081-2/+8
| | | | | | | | | Done in InstrProfWriter to eliminate the need for client code to do the sorting. The operation is done once and reused many times so it is more efficient. Update unit test to remove sorting. Also update expected output of affected tests. llvm-svn: 257145
* Fix a bug in test case -- duplicate entriesXinliang David Li2015-12-201-21/+0
| | | | llvm-svn: 256117
* [PGO] Handle and report overflow during profile merge for all types of dataNathan Slingerland2015-12-165-20/+73
| | | | | | | | | | | | 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
* Test cleanup -- remove duplicate run linesXinliang David Li2015-12-151-4/+0
| | | | llvm-svn: 255673
OpenPOWER on IntegriCloud