summaryrefslogtreecommitdiffstats
path: root/clang/docs/SourceBasedCodeCoverage.rst
Commit message (Collapse)AuthorAgeFilesLines
* [Coverage] Emit a gap region to cover switch bodiesVedant Kumar2019-12-031-0/+34
| | | | | | | | | | | | | | Emit a gap region beginning where the switch body begins. This sets line execution counts in the areas between non-overlapping cases to 0. This also removes some special handling of the first case in a switch: these are now treated like any other case. This does not resolve an outstanding issue with case statement regions that do not end when a region is terminated. But it should address llvm.org/PR44011. Differential Revision: https://reviews.llvm.org/D70571
* [profile] Support online merging with continuous sync modeVedant Kumar2019-11-181-6/+5
| | | | | | | | | | | | | | | Make it possible to use online profile merging ("%m" mode) with continuous sync ("%c" mode). To implement this, the merged profile is locked in the runtime initialization step and either a) filled out for the first time or b) checked for compatibility. Then, the profile can simply be mmap()'d with MAP_SHARED set. With the mmap() in place, counter updates from every process which uses an image are mapped onto the same set of physical pages assigned by the filesystem cache. After the mmap() is set up, the profile is unlocked. Differential Revision: https://reviews.llvm.org/D69586
* [profile] Add a mode to continuously sync counter updates to a fileVedant Kumar2019-10-311-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for continuously syncing profile counter updates to a file. The motivation for this is that programs do not always exit cleanly. On iOS, for example, programs are usually killed via a signal from the OS. Running atexit() handlers after catching a signal is unreliable, so some method for progressively writing out profile data is necessary. The approach taken here is to mmap() the `__llvm_prf_cnts` section onto a raw profile. To do this, the linker must page-align the counter and data sections, and the runtime must ensure that counters are mapped to a page-aligned offset within a raw profile. Continuous mode is (for the moment) incompatible with the online merging mode. This limitation is lifted in https://reviews.llvm.org/D69586. Continuous mode is also (for the moment) incompatible with value profiling, as I'm not sure whether there is interest in this and the implementation may be tricky. As I have not been able to test extensively on non-Darwin platforms, only Darwin support is included for the moment. However, continuous mode may "just work" without modification on Linux and some UNIX-likes. AIUI the default value for the GNU linker's `--section-alignment` flag is set to the page size on many systems. This appears to be true for LLD as well, as its `no_nmagic` option is on by default. Continuous mode will not "just work" on Fuchsia or Windows, as it's not possible to mmap() a section on these platforms. There is a proposal to add a layer of indirection to the profile instrumentation to support these platforms. rdar://54210980 Differential Revision: https://reviews.llvm.org/D68351
* Update our URLs in clang doc to use httpsSylvestre Ledru2018-11-041-1/+1
| | | | llvm-svn: 346101
* [docs] Coverage: Improve the wording a bitVedant Kumar2017-06-191-3/+3
| | | | llvm-svn: 305745
* [docs] Coverage: document issue with the BFD linkerVedant Kumar2017-06-191-0/+5
| | | | llvm-svn: 305743
* [docs] coverage: Clarify which flags enable gcov-style profiling (NFC)Vedant Kumar2017-02-091-0/+1
| | | | | | | | | Point out that --coverage and -ftest-coverage, which is what most people are used to, do not enable clang's frontend based coverage pass. Suggested by Benn Bolay! llvm-svn: 294626
* Clarify how to forward-declare __llvm_profile symbols.Nico Weber2017-01-251-0/+2
| | | | llvm-svn: 293065
* [docs] Touch up the coverage docs some moreVedant Kumar2016-09-221-22/+20
| | | | llvm-svn: 282169
* [docs] Extend the code coverage docs some moreVedant Kumar2016-09-201-3/+35
| | | | | | | | Flesh out the section on interpreting coverage reports, mention the coverage export feature, and add notes on how to build llvm with coverage turned on. llvm-svn: 281988
* [docs] Touch up the code coverage docVedant Kumar2016-09-191-9/+29
| | | | llvm-svn: 281881
* [docs] Coverage: Reference the new -output-dir optionVedant Kumar2016-07-281-1/+1
| | | | llvm-svn: 277081
* [docs] Mention some new options in llvm-covVedant Kumar2016-07-281-7/+7
| | | | llvm-svn: 277080
* fix two typos in the docSylvestre Ledru2016-07-021-1/+1
| | | | llvm-svn: 274447
* [Docs] More warning fixes to unbreak the docs buildbot.George Burgess IV2016-06-211-1/+1
| | | | | | | | | | | | | A number of warnings still remain, but these were the last of the "unlexable code"-related ones (AFAICT). I changed a few examples in docs/UsersManual.rst to showcase -Wextra-tokens because it's already documented (-Wmultichar isn't), and the sphinx C lexer apparently can't handle char literals like 'ab'. It seemed like a better overall approach than just marking the code blocks as none or console. llvm-svn: 273232
* [docs] Coverage: Document the profile merge pool specifierVedant Kumar2016-06-141-0/+8
| | | | llvm-svn: 272604
* [docs] Coverage: Clarify return value of __llvm_profile_write_fileVedant Kumar2016-06-081-2/+3
| | | | llvm-svn: 272215
* [docs] Coverage: Flesh out instructions for avoiding static initializeresVedant Kumar2016-06-081-8/+16
| | | | llvm-svn: 272214
* [docs] Coverage: Explain how to avoid static initializersVedant Kumar2016-06-071-0/+16
| | | | llvm-svn: 272067
* [docs] Clarify limitations section of SourceBasedCodeCoverage.rstVedant Kumar2016-06-061-4/+5
| | | | | | | | | Mention that the code coverage tool becomes less precise whenever unpredictable changes in control flow occur. Thanks to Sean Silva for pointing this out! llvm-svn: 271902
* [docs] Add a limitations section to SourceBasedCodeCoverage.rstVedant Kumar2016-06-021-2/+19
| | | | llvm-svn: 271544
* [docs] Fix misplaced commaVedant Kumar2016-06-021-1/+1
| | | | llvm-svn: 271472
* [docs] Minor formatting changes and typo fixesVedant Kumar2016-06-021-11/+10
| | | | llvm-svn: 271471
* [docs] Use cpp code-blocks where appropriateVedant Kumar2016-06-021-2/+2
| | | | llvm-svn: 271461
* [docs] Add missing newline to console sectionVedant Kumar2016-06-021-0/+1
| | | | llvm-svn: 271457
* [docs] Document the source-based code coverage featureVedant Kumar2016-06-021-0/+186
Differential Revision: http://reviews.llvm.org/D20715 llvm-svn: 271454
OpenPOWER on IntegriCloud