summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/CoverageViewOptions.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert r367649: Improve raw_ostream so that you can "write" colors using ↵Rui Ueyama2019-08-021-1/+1
| | | | | | | | operator<< This reverts commit r367649 in an attempt to unbreak Windows bots. llvm-svn: 367658
* Improve raw_ostream so that you can "write" colors using operator<<Rui Ueyama2019-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. raw_ostream supports ANSI colors so that you can write messages to the termina with colors. Previously, in order to change and reset color, you had to call `changeColor` and `resetColor` functions, respectively. So, if you print out "error: " in red, for example, you had to do something like this: OS.changeColor(raw_ostream::RED); OS << "error: "; OS.resetColor(); With this patch, you can write the same code as follows: OS << raw_ostream::RED << "error: " << raw_ostream::RESET; 2. Add a boolean flag to raw_ostream so that you can disable colored output. If you disable colors, changeColor, operator<<(Color), resetColor and other color-related functions have no effect. Most LLVM tools automatically prints out messages using colors, and you can disable it by passing a flag such as `--disable-colors`. This new flag makes it easy to write code that works that way. Differential Revision: https://reviews.llvm.org/D65564 llvm-svn: 367649
* Speeding up llvm-cov export with multithreaded renderFiles implementation.Max Moroz2019-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: CoverageExporterJson::renderFiles accounts for most of the execution time given a large profdata file with multiple binaries. Proposed solution is to generate JSON for each file in parallel and sort at the end to preserve deterministic output. Also added flags to skip generating parts of the output to trim the output size. Patch by Sajjad Mirza (@sajjadm). Reviewers: Dor1s, vsk Reviewed By: Dor1s, vsk Subscribers: liaoyuke, mgrang, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59277 llvm-svn: 356178
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [llvm-cov] Add lcov tracefile export format.Max Moroz2018-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: lcov tracefiles are used by various coverage reporting tools and build systems (e.g., Bazel). It is a simple text-based format to parse and more convenient to use than the JSON export format, which needs additional processing to map regions/segments back to line numbers. It's a little unfortunate that "text" format is now overloaded to refer specifically to JSON for export, but I wanted to avoid making any breaking changes to the UI of the llvm-cov tool at this time. Patch by Tony Allevato (@allevato). Reviewers: Dor1s, vsk Reviewed By: Dor1s, vsk Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D54266 llvm-svn: 346506
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-011-7/+7
| | | | | | | | | | | | | | | | We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46290 llvm-svn: 331272
* IWYU llvm-config.h for LLVM_VERSION_STRINGNico Weber2018-04-251-0/+1
| | | | llvm-svn: 330856
* [llvm-cov] Multi-threaded implementation of prepareFileReports method.Max Moroz2018-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Local testing has demonstrated a great speed improvement, compare the following: 1) Existing version: ``` $ time llvm-cov show -format=html -output-dir=report -instr-profile=... ... The tool has been launched: 00:00:00 Loading coverage data: 00:00:00 Get unique source files: 00:00:33 Creating an index out of the source files: 00:00:34 Going into prepareFileReports: 00:00:34 Going to emit summary information for each file: 00:28:55 <-- 28:21 min! Going to emit links to files with no function: 00:28:55 Launching 32 threads for generating HTML files: 00:28:55 real 37m43.651s user 112m5.540s sys 7m39.872s ``` 2) Multi-threaded version with 32 CPUs: ``` $ time llvm-cov show -format=html -output-dir=report -instr-profile=... ... The tool has been launched: 00:00:00 Loading coverage data: 00:00:00 Get unique source files: 00:00:38 Creating an index out of the source files: 00:00:40 Going into prepareFileReports: 00:00:40 Preparing file reports using 32 threads: 00:00:40 # Creating thread tasks for the following number of files: 16422 Going to emit summary information for each file: 00:01:57 <-- 1:17 min! Going to emit links to files with no function: 00:01:58 Launching 32 threads for generating HTML files: 00:01:58 real 11m2.044s user 134m48.124s sys 7m53.388s ``` Reviewers: vsk, morehouse Reviewed By: vsk Subscribers: Dor1s, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D41206 llvm-svn: 321871
* [llvm-cov] Add an option for "export" command to emit only file summary data.Max Moroz2017-12-111-0/+1
| | | | | | | | | | | | | | Summary: That allows to get the same data as produced by "llvm-cov report", but in JSON format, which is better for further processing by end users. Reviewers: vsk Reviewed By: vsk Differential Revision: https://reviews.llvm.org/D41085 llvm-svn: 320435
* [llvm-cov] Allow hiding instantiation/region coverage from summary tablesEli Friedman2017-09-111-0/+2
| | | | | | | | | | | | | Region coverage is difficult to explain without going deep into how coverage is implemented. Instantiation coverage is easier to explain, but probably not useful in most cases (templates don't exist in C, and most C++ code contains relatively few templates). This patch adds the options "-show-region-summary" and "-show-instantiation-summary" to allow hiding those columns. "-show-instantiation-summary" is turned off by default. llvm-svn: 312969
* [llvm-cov] Unify region marker placement between text/html modesVedant Kumar2017-09-081-1/+0
| | | | | | | | | | | | Make sure that the text and html emitters always emit the same set of region markers, and avoid emitting redundant markers for line segments which don't end on the line they start on. This is related to D35925, and depends on D36014 Differential Revision: https://reviews.llvm.org/D36020 llvm-svn: 312813
* [llvm-cov] Do not print out the filename of the object fileVedant Kumar2016-10-251-1/+0
| | | | | | | | | When we load coverage data from multiple objects, we don't have a way to attribute a source object to a function record. Printing out the object filename next to the source filename is already not very useful: soon, it'll actually become misleading. Stop printing out the filename now. llvm-svn: 285043
* [llvm-cov] - Included footer "Generated by llvm-cov -- llvm version <version ↵Ying Yi2016-09-131-0/+7
| | | | | | | | | | number>" in the coverage report. The llvm-cov version information will be useful to the user when comparing the code coverage across different versions of llvm-cov. This patch provides the llvm-cov version information in the generated coverage report. Differential Revision: https://reviews.llvm.org/D24457 llvm-svn: 281321
* [llvm-cov] Add the project summary to each source file coverage report.Ying Yi2016-08-241-0/+9
| | | | | | | | | | | | This patch includes the following changes: - Included header "Code coverage report" and include the date that the report was created. - Included title (as specified in a command line option, (i.e llvm-cov -project-title="Simple Test") - In the summary, list the elf files that the source code file has contributed to. - Used column heading for "Line No.", "Count No.", Source". Differential Revision: https://reviews.llvm.org/D23345 llvm-svn: 279628
* [LLVM-COV]Replace tabs to the space indentations in the HTML coverage report.Ying Yi2016-08-041-0/+1
| | | | | | | | | | | When using orbis-llvm-cov.exe to generate the HTML report, the HTML report can look quite different to the source file if it includes tabs.The default tab size is 2 spaces instead of 8 spaces. A command line switch is be added to set the tab size. Differential Revision: https://reviews.llvm.org/D23087 llvm-svn: 277715
* [llvm-cov] Optionally use a symbol demangler when preparing reportsVedant Kumar2016-07-151-0/+5
| | | | | | | | | | Add an option to specify a symbol demangler (as well as options to the demangler). This can be used to make reports more human-readable. This option is especially useful in -output-dir mode, since it isn't as easy to manually pipe reports into a demangler in this mode. llvm-svn: 275640
* [llvm-cov] Document a few private fields of CodeCoverageTool (NFC)Vedant Kumar2016-07-151-1/+1
| | | | llvm-svn: 275639
* [llvm-cov] Add support for creating html reportsVedant Kumar2016-07-061-1/+2
| | | | | | | | Based on a patch by Harlan Haskins! Differential Revision: http://reviews.llvm.org/D18278 llvm-svn: 274688
* [llvm-cov] Rename ShowFormat to Format (NFC)Vedant Kumar2016-06-281-1/+1
| | | | | | | This makes it a bit more generic, in case we want to emit summary reports in different formats in the future. llvm-svn: 274026
* [llvm-cov] Move a check into a helper method (NFC)Vedant Kumar2016-06-281-0/+3
| | | | llvm-svn: 274025
* Reapply "[llvm-cov] Add an -output-dir option for the show sub-command""Vedant Kumar2016-06-281-0/+1
| | | | | | | | | | | | | | | Passing -output-dir path/to/dir to llvm-cov show creates path/to/dir if it doesn't already exist, and prints reports into that directory. In function view mode, all views are written into path/to/dir/functions.$EXTENSION. In file view mode, all views are written into path/to/dir/coverage/$PATH.$EXTENSION. Changes since the initial commit: - Avoid accidentally closing stdout twice. llvm-svn: 273985
* Revert "[llvm-cov] Add an -output-dir option for the show sub-command"Vedant Kumar2016-06-281-1/+0
| | | | | | | This reverts commit r273971. test/profile/instrprof-visibility.cpp is failing because of an uncaught error in SafelyCloseFileDescriptor. llvm-svn: 273978
* [llvm-cov] Add an -output-dir option for the show sub-commandVedant Kumar2016-06-281-0/+1
| | | | | | | | | | | Passing -output-dir path/to/dir to llvm-cov show creates path/to/dir if it doesn't already exist, and prints reports into that directory. In function view mode, all views are written into path/to/dir/functions.$EXTENSION. In file view mode, all views are written into path/to/dir/coverage/$PATH.$EXTENSION. llvm-svn: 273971
* [llvm-cov] Add a format option for the 'show' sub-command (mostly NFC)Vedant Kumar2016-06-281-0/+5
| | | | llvm-svn: 273968
* [llvm-cov] Disable name and path truncationVedant Kumar2015-09-141-0/+1
| | | | | | | | | | | Change the output of llvm-cov s.t it does not truncate function names and file paths when printing coverage reports. Differential Revision: http://reviews.llvm.org/D12647 rdar://22531141 llvm-svn: 247635
* llvm-cov: add code coverage tool that's based on coverage mapping format and ↵Alex Lorenz2014-08-221-0/+36
clang's pgo. This commit expands llvm-cov's functionality by adding support for a new code coverage tool that uses LLVM's coverage mapping format and clang's instrumentation based profiling. The gcov compatible tool can be invoked by supplying the 'gcov' command as the first argument, or by modifying the tool's name to end with 'gcov'. Differential Revision: http://reviews.llvm.org/D4445 llvm-svn: 216300
OpenPOWER on IntegriCloud