summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/InstrProfWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-1/+1
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-191-1/+1
| | | | | | | | | | | | | The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
* Re-apply "InstrProf: Add unit tests for the profile reader and writer"Justin Bogner2015-02-181-3/+28
| | | | | | | | | | | | | | 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
* Revert "InstrProf: Add unit tests for the profile reader and writer"Justin Bogner2015-02-171-27/+3
| | | | | | | | | | 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
* Re-apply "InstrProf: Add unit tests for the profile reader and writer"Justin Bogner2015-02-171-3/+27
| | | | | | | | Add these tests again, but use va_list instead of initializer lists. This reverts r229456, reapplying r229455. llvm-svn: 229478
* Revert "InstrProf: Add unit tests for the profile reader and writer"Justin Bogner2015-02-161-27/+3
| | | | | | | | 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-161-3/+27
| | | | | | | | | | 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
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-2/+1
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Eliminate some deep std::vector copies. NFC.Benjamin Kramer2014-10-031-1/+0
| | | | llvm-svn: 218999
* InstrProf: Allow multiple functions with the same nameJustin Bogner2014-08-011-24/+33
| | | | | | | | | | | | | | | | | | | | | | | This updates the instrumentation based profiling format so that when we have multiple functions with the same name (but different function hashes) we keep all of them instead of rejecting the later ones. There are a number of scenarios where this can come up where it's more useful to keep multiple function profiles: * Name collisions in unrelated libraries that are profiled together. * Multiple "main" functions from multiple tools built against a common library. * Combining profiles from different build configurations (ie, asserts and no-asserts) The profile format now stores the number of counters between the hash and the counts themselves, so that multiple sets of counts can be stored. Since this is backwards incompatible, I've bumped the format version and added some trivial logic to skip this when reading the old format. llvm-svn: 214585
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-3/+4
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* ProfileData: Avoid unnecessary copies of CounterDataJustin Bogner2014-04-231-6/+6
| | | | | | | | We're currently copying CounterData from InstrProfWriter into the OnDiskHashTable, even though we don't need to, and then carelessly leaking those copies. A const pointer is much better here. llvm-svn: 207009
* ProfileData: Remove an extra semicolonJustin Bogner2014-04-191-1/+1
| | | | | | Spotted by Nick Lewycky in review, thanks! llvm-svn: 206708
* OnDiskHashTable: Audit types and use offset_type consistentlyJustin Bogner2014-04-191-4/+4
| | | | llvm-svn: 206675
* ProfileData: Add support for the indexed instrprof formatJustin Bogner2014-04-181-11/+77
| | | | | | | | This adds support for an indexed instrumentation based profiling format, which is just a small header and an on disk hash table. This format will be used by clang's -fprofile-instr-use= for PGO. llvm-svn: 206656
* ProfileData: Avoid brace initialization, windows doesn't like itJustin Bogner2014-03-211-1/+3
| | | | llvm-svn: 204494
* ProfileData: Introduce InstrProfWriter using the naive text formatJustin Bogner2014-03-211-0/+58
This isn't a format we'll want to write out in practice, but moving it to the writer library simplifies llvm-profdata and isolates it from further changes to the format. This also allows us to update the tests to not rely on the text output format. llvm-svn: 204489
OpenPOWER on IntegriCloud