summaryrefslogtreecommitdiff
path: root/docs/CommandGuide
AgeCommit message (Collapse)Author
2017-12-09Remove duplicate option from documentation.Adrian Prantl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320258 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08dwarfdump: Add support for the --diff option.Adrian Prantl
--diff Emit the output in a diff-friendly way by omitting offsets and addresses. <rdar://problem/34502625> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320214 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30[MC] Function stack size section.Sean Eveson
Re applying after fixing issues in the diff, sorry for any painful conflicts/merges! Original RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-August/117028.html This change adds a '.stack-size' section containing metadata on function stack sizes to output ELF files behind the new -stack-size-section flag. The section contains pairs of function symbol references (8 byte) and stack sizes (unsigned LEB128). The contents of this section can be used to measure changes to stack sizes between different versions of the compiler or a source base. The advantage of having a section is that we can extract this information when examining binaries that we didn't build, and it allows users and tools easy access to that information just by referencing the binary. There is a follow up change to add an option to clang. Thanks. Reviewers: hfinkel, MatzeB Reviewed By: MatzeB Subscribers: thegameg, asb, llvm-commits Differential Revision: https://reviews.llvm.org/D39788 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319430 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30Revert r319423: [MC] Function stack size section.Sean Eveson
I messed up the diff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319429 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30[MC] Function stack size section.Sean Eveson
Summary: Original RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-August/117028.html I wasn't sure who to put as reviewers, so please add/remove people as appropriate. This change adds a '.stack-size' section containing metadata on function stack sizes to output ELF files behind the new -stack-size-section flag. The section contains pairs of function symbol references (8 byte) and stack sizes (unsigned LEB128). The contents of this section can be used to measure changes to stack sizes between different versions of the compiler or a source base. The advantage of having a section is that we can extract this information when examining binaries that we didn't build, and it allows users and tools easy access to that information just by referencing the binary. There is a follow up change to add an option to clang. Thanks. Reviewers: hfinkel, MatzeB Reviewed By: MatzeB Subscribers: thegameg, asb, llvm-commits Differential Revision: https://reviews.llvm.org/D39788 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319423 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-07Add a -D flag to FileCheck to define variablesAlexander Richardson
Summary: This makes it very easy to test files that only differ in a constant value somewhere in the test case. Reviewers: jlebar, hfinkel, chandlerc, probinson Reviewed By: probinson Subscribers: probinson, llvm-commits Differential Revision: https://reviews.llvm.org/D39629 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317572 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-06Canonicalize spelling of long-form-options in dsymutil.rstAdrian Prantl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317490 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-06[docs] Update code block for compatibility with Sphinx 1.5.1Jonas Devlieghere
It is currently not possible to build the documentation with cmake and the same version of Sphinx (1.5.1) used to generate the public facing documentation on llvm.org. When code blocks cannot be parsed by Pygments, it generates a warning which is treated as an error. In addition to being annoying and confusing for developers, this needlessly increases the bar for newcomers that want to get involved. This patch removes the language specifier from the affected block. The result is the same as when parsing fails: the block are not highlighted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317472 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02[dsymutil][doc] Improve wording in manpage and rename file.Jonas Devlieghere
- Improve wording - Rename llvm-dsymutil to dsymutil - Name -arch=<arch> argument Differential revision: https://reviews.llvm.org/D39561 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02[dsymutil] Add a manpage for dsymutilJonas Devlieghere
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317221 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-14Revert "lit.py: Add new %{shared_output(LABEL)} substitution"Jordan Rose
This reverts r315697 and my ill-fated attempts to fix it on Windows. I'll try again when I get access to a Windows machine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315793 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13lit.py: Add new %{shared_output(LABEL)} substitutionJordan Rose
This refers to a temporary path that can be shared across all tests, identified by a particular label. This can be used for things like caches. At the moment, the character set for the LABEL is limited to C identifier characters, plus '-', '+', '=', and '.'. This is the same set of characters currently allowed in REQUIRES clause identifiers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315697 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13[FileCheck] regexp doc update/fixSjoerd Meijer
Minor doc update that the FileCheck matcher supports POSIX ERE. It also fixes a minor issue in the regexp describing a variable name: underscores are allowed too. Differential Revision: https://reviews.llvm.org/D38787 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315679 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-06llvm-dwarfdump: Add an option to collect debug info quality metrics.Adrian Prantl
At the last LLVM dev meeting we had a debug info for optimized code BoF session. In that session I presented some graphs that showed how the quality of the debug info produced by LLVM changed over the last couple of years. This is a cleaned up version of the patch I used to collect the this data. It is implemented as an extension of llvm-dwarfdump, adding a new --statistics option. The intended use-case is to automatically run this on the debug info produced by, e.g., our bots, to identify eyebrow-raising changes or regressions introduced by new transformations that we could act on. In the current form, two kinds of data are being collected: - The number of variables that have a debug location versus the number of variables in total (this takes into account inlined instances of the same function, so if a variable is completely missing form only one instance it will be found). - The PC range covered by variable location descriptions versus the PC range of all variables' containing lexical scopes. The output format is versioned and extensible, so I'm looking forward to both bug fixes and ideas for other data that would be interesting to track. Differential Revision: https://reviews.llvm.org/D36627 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315101 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-03Add a manpage for llvm-dwarfdump.Adrian Prantl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314863 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-25[docs] llvm-cov: Make docs for boolean options more consistentVedant Kumar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314176 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-20[docs] llvm-cov: Document -show-instantiation-summaryVedant Kumar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313824 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-31[llvm-cov] Read in function names for filtering from a text file.Sean Eveson
Summary: Add a -name-whitelist option, which behaves in the same way as -name, but it reads in multiple function names from the given input file(s). Reviewers: vsk Reviewed By: vsk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37111 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-14[llvm-cov] Add an option which maps the location of source directories on ↵Sean Eveson
another machine to your local copies Summary: This patch adds the -path-equivalence option (example: llvm-cov show -path-equivalence=/origin/path,/local/path) which maps the source code path from one machine to another when using `llvm-cov show`. This is similar to the -filename-equivalence option, but doesn't require you to specify all the source files on the command line. This allows you to generate the coverage data on one machine (e.g. in a CI system), and then use llvm-cov on another machine where you have the same code base on a different path. Reviewers: vsk Reviewed By: vsk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36391 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310827 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-11Add documentation for llvm-pdbutil.Zachary Turner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310744 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-02[llvm-cov] Respect the value of the -show-instantiations optionVedant Kumar
Make `-show-instantiations=false` actually skip displaying instantiation sub-views, instead of simply ignoring the option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309903 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-01[llvm-cov] Allow specifying distinct architectures for each loaded binaryVedant Kumar
The coverage tool needs to know which slice to look at when it's handed a universal binary. Some projects need to look at aggregate coverage reports for a variety of slices in different binaries: this patch adds support for these kinds of projects to llvm-cov. rdar://problem/33579007 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309747 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13[lit] add a -vv option to echo all executed commands.George Karpenkov
Debugging LIT scripts can be rather painful, as LIT directly does not specify which line has failed. Rather, FileCheck is expected to report the failing location, but it can be often ambiguous if multiple commands are tested against the same prefix. This change adds a -vv option, which echoes all output. Then detecting the error becomes straightforward: last printed line is the failing one. Of course, it could be desired to try to get failing line number directly from bash, but it involves excessive hacks on older bash versions (cf. https://stackoverflow.com/questions/24398691/how-to-get-the-real-line-number-of-a-failing-bash-command) Differential Revision: https://reviews.llvm.org/D35330 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307938 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-11[ProfileData] Add new option to dump topn hottest functionsXinliang David Li
Differential Revision: http://reviews.llvm.org/D35155 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307702 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-11[llvm-cov] Add a cl::opt to control the number of threadsVedant Kumar
When an output directory is specified, llvm-cov spawns some threads to speed up the process of writing out file reports. Add an option which allows users to control how many threads llvm-cov uses. A CommandGuide.rst update + test is included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307609 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07[lit] Modify LIT to accept environment variable LIT_FILTER to select tests.George Karpenkov
This is especially useful when lit is invoked indirectly by the build system, and additional arguments can not be easily specified. Differential Revision: https://reviews.llvm.org/D35091 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307339 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-29llvm-nm: Add support for symbol demangling (-C/--demangle)Sam Clegg
Differential Revision: https://reviews.llvm.org/D34668 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306718 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-16Resubmit r297897: [PGO] Value profile for size of memory intrinsic callsRong Xu
R297897 inadvertently enabled annotation for memop profiling. This new patch fixed it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297996 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-16Revert "[PGO] Value profile for size of memory intrinsic calls"Eric Liu
This commit reverts r297897 and r297909. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297951 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-15[PGO] Value profile for size of memory intrinsic callsRong Xu
This patch adds the value profile support to profile the size parameter of memory intrinsic calls: memcpy, memcmp, and memmov. Differential Revision: http://reviews.llvm.org/D28965 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297897 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-09[FileCheck] Added --enable-var-scope option to enable scope for regex variables.Artem Belevich
If `--enable-var-scope` is in effect, variables with names that start with `$` are considered to be global. All other variables are local. All local variables get undefined at the beginning of each CHECK-LABEL block. Global variables are not affected by CHECK-LABEL. This makes it easier to ensure that individual tests are not affected by variables set in preceding tests. Differential Revision: https://reviews.llvm.org/D30749 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297396 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-09lit.rst: Fix sphinx complaint about multiple option definitionsMatthias Braun
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294646 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-09[docs] cleanup documentation on lit substitutionsDavid Bozier
1. Added missing substitutions to the documentation in docs/TestingGuide.rst 2. Modified docs/CommandGuide/lit.rst to only document the "base" set of substitutions and to refer the reader to docs/TestingGuide.rst for more detailed info on substitutions. Patch by bd1976llvm Differential Revision: https://reviews.llvm.org/D29281 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294586 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05[llvm-cov] Don't show function summaries when filtering by filename (fixes ↵Vedant Kumar
PR31395) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294137 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18[lit] Support sharding testsuites, for parallel execution.Graydon Hoare
Summary: This change equips lit.py with two new options, --num-shards=M and --run-shard=N (set by default from env vars LIT_NUM_SHARDS and LIT_RUN_SHARD). The options must be used together, and N must be in 1..M. Together these options effect only test selection: they partition the testsuite into M equal-sized "shards", then select only the Nth shard. They can be used in a cluster of test machines to achieve a very crude (static) form of parallelism, with minimal configuration work. Reviewers: modocache, ddunbar Reviewed By: ddunbar Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28789 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-25[llvm-cov] Add support for loading coverage from multiple objectsVedant Kumar
Differential Revision: https://reviews.llvm.org/D25086 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-04[llvm-cov] Add some documentation for the -tab-size optionVedant Kumar
Also, un-hide the cl::opt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277741 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26[docs] Fix a sphinx error in llvm-cov.rstVedant Kumar
Failing bot: http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/12025 Fix tested with `ninja docs-llvm-html`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276820 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26Retry: [llvm-cov] Add support for exporting coverage data to JSONVedant Kumar
This enables users to export coverage information as portable JSON for use by analysis tools and storage in document based databases. The export sub-command is invoked just like the others: llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary The resulting JSON contains a list of files and functions. Every file object contains a list of segments, expansions, and a summary of the file's region, function, and line coverage. Every function object contains the function's name and regions. There is also a total summary for the entire object file. Changes since the initial commit (r276813): - Fixed the regexes in the tests to handle Windows filepaths. Patch by Eddie Hurtig! Differential Revision: https://reviews.llvm.org/D22651 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276818 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26Revert "[llvm-cov] Add support for exporting coverage data to JSON"Vedant Kumar
This reverts commit r276813. The Windows bots are complaining about some of the filename regexes in the tests: http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/5299 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276816 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26[llvm-cov] Add support for exporting coverage data to JSONVedant Kumar
This enables users to export coverage information as portable JSON for use by analysis tools and storage in document based databases. The export sub-command is invoked just like the others: llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary The resulting JSON contains a list of files and functions. Every file object contains a list of segments, expansions, and a summary of the file's region, function, and line coverage. Every function object contains the function's name and regions. There is also a total summary for the entire object file. Patch by Eddie Hurtig! Differential Revision: https://reviews.llvm.org/D22651 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276813 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26[lit] Document the 'available_features' member of the config object.Daniel Sanders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276744 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-20[docs] Fixing Sphinx warnings to unclog the buildbotRenato Golin
Lots of blocks had "llvm" or "nasm" syntax types but either weren't following the syntax, or the syntax has changed (and sphinx hasn't keep up) or the type doesn't even exist (nasm?). Other documents had :options: what were invalid. I only removed those that had warnings, and left the ones that didn't, in order to follow the principle of least surprise. This is like this for ages, but the buildbot is now failing on errors. It may take a while to upgrade the buildbot's sphinx, if that's even possible, but that shouldn't stop us from getting docs updates (which seem down for quite a while). Also, we're not losing any syntax highlight, since when it doesn't parse, it doesn't colour. Ie. those blocks are not being highlighted anyway. I'm trying to get all docs in one go, so that it's easy to revert later if we do fix, or at least easy to know what's to fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-19Retry: [llvm-profdata] Speed up merging by using a thread poolVedant Kumar
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275938 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-19Revert "[llvm-profdata] Speed up merging by using a thread pool"Vedant Kumar
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275937 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18[llvm-profdata] Speed up merging by using a thread poolVedant Kumar
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275921 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15bugpoint: add flag -verbose-errorsSebastian Pop
The default behavior of bugpoint is to print "<crash>" when it finds a reduced test that crashes compilation. With this flag we now can see the output of the crashing program. This is useful to make sure it is the same error being tracked down and not a different error that happens to crash the compiler as well. Differential Revision: https://reviews.llvm.org/D22411 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15[llvm-cov] Optionally use a symbol demangler when preparing reportsVedant Kumar
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275640 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-06[llvm-cov] Add support for creating html reportsVedant Kumar
Based on a patch by Harlan Haskins! Differential Revision: http://reviews.llvm.org/D18278 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-28Reapply "[llvm-cov] Add an -output-dir option for the show sub-command""Vedant Kumar
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273985 91177308-0d34-0410-b5e6-96231b3b80d8