summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert "[lit] Generalized /dev/null support on Windows.""Mircea Trofin2018-03-271-1/+1
| | | | | | | | | | | | | | | | | Summary: This reverts commit r328596. Checking if the arguments are strings before testing if they contain "/dev/null". Reviewers: rnk Reviewed By: rnk Subscribers: delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D44914 llvm-svn: 328603
* Revert "[lit] Generalized /dev/null support on Windows."Mircea Trofin2018-03-261-1/+1
| | | | | | This reverts commit ca7fdbb974384ce5a05528b22a41d46b1cc13e92. llvm-svn: 328596
* [lit] Generalized /dev/null support on Windows.Mircea Trofin2018-03-261-1/+1
| | | | | | | | | | | | | | Generalized /dev/null remapping on Windows, and added test. Reviewers: rnk Reviewed By: rnk Subscribers: amccarth, zturner, delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D44771 llvm-svn: 328589
* Revert "Revert "[InstrProf] Support for external functions in text format.""Mircea Trofin2018-03-221-0/+50
| | | | | | | | | | | | | | | | | | | | | Summary: This reverts commit 364eb09576a7667bc6d3ff80c52a83014ccac976 and separates out the portion that was fixing binary reader error propagation - turns out, there are production cases where that causes a regression. Will re-introduce the error propagation fix separately. The fix to the text reader error propagation is still "in". Reviewers: bkramer Reviewed By: bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44807 llvm-svn: 328244
* Revert "[InstrProf] Support for external functions in text format."Benjamin Kramer2018-03-221-50/+0
| | | | | | | This reverts commit r328132. Breaks FDO selfhost. I'm seeing error: /tmp/profraw: Invalid instrumentation profile data (bad magic) llvm-svn: 328207
* [llvm-profdata] Use "-o /dev/null" in invalid-profdata.testReid Kleckner2018-03-211-1/+1
| | | | | | Lit automatically rewrites /dev/null to a temp file on Windows. llvm-svn: 328157
* [InstrProf] Support for external functions in text format.Mircea Trofin2018-03-211-0/+50
| | | | | | | | | | | | | | | | | | | | | | | Summary: External functions appearing as indirect call targets could not be found in the SymTab, and the value:counter record was represented, in the text format, using an empty string for the name. This would then cause a silent parsing error when reading. This CL: - adds explicit support for such functions - fixes the places where we would not propagate errors when reading - addresses a performance issue due to eager resorting of the SymTab. Reviewers: xur, eraman, davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44717 llvm-svn: 328132
* Profiling tests: Endianess XFAIL for powerpc- (32-bit)Hubert Tong2018-01-091-1/+1
| | | | | | | | | | | | Add powerpc- (32-bit) as XFAIL for tests that are documented either in- line or via commit messages as expected to fail on big-endian systems. Tests not documented in-line are documented in commit messages as follows: r211172 - test/tools/llvm-cov/llvm-cov.test r247920 - test/Transforms/SampleProfile/gcc-simple.ll llvm-svn: 322114
* [llvm-profdata] Don't treat non-fatal merge errors as fatalVedant Kumar2017-11-172-1/+10
| | | | | | | | | This fixes an issue seen on the coverage bot: http://lab.llvm.org:8080/green/view/Experimental/job/clang-stage2-coverage-R/1930 Profile merging shouldn't fail if a single counter mismatch is detected. llvm-svn: 318555
* [llvm-profdata] Fix a dangling reference to an error stringVedant Kumar2017-11-175-0/+32
| | | | llvm-svn: 318502
* Adjust test after r318159Adam Nemet2017-11-141-0/+1
| | | | llvm-svn: 318160
* [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
OpenPOWER on IntegriCloud