summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandGuide
diff options
context:
space:
mode:
authorDjordje Todorovic <djordje.todorovic@rt-rk.com>2019-10-01 09:59:15 +0000
committerDjordje Todorovic <djordje.todorovic@rt-rk.com>2019-10-01 09:59:15 +0000
commit6d7f7e6792bb79eeb209c359717862e8da7e4c30 (patch)
tree66fd9312e06f138f51f9b4d9b557397f1cfa2c8b /llvm/docs/CommandGuide
parent0210a1a530f3b824d1429abf5cd7f24a869908bd (diff)
downloadbcm5719-llvm-6d7f7e6792bb79eeb209c359717862e8da7e4c30.tar.gz
bcm5719-llvm-6d7f7e6792bb79eeb209c359717862e8da7e4c30.zip
Reland "[utils] Implement the llvm-locstats tool"
The tool reports verbose output for the DWARF debug location coverage. The llvm-locstats for each variable or formal parameter DIE computes what percentage from the code section bytes, where it is in scope, it has location description. The line 0 shows the number (and the percentage) of DIEs with no location information, but the line 100 shows the number (and the percentage) of DIEs where there is location information in all code section bytes (where the variable or parameter is in the scope). The line 50..59 shows the number (and the percentage) of DIEs where the location information is in between 50 and 59 percentage of its scope covered. Differential Revision: https://reviews.llvm.org/D66526 llvm-svn: 373317
Diffstat (limited to 'llvm/docs/CommandGuide')
-rw-r--r--llvm/docs/CommandGuide/index.rst1
-rw-r--r--llvm/docs/CommandGuide/llvm-locstats.rst79
2 files changed, 80 insertions, 0 deletions
diff --git a/llvm/docs/CommandGuide/index.rst b/llvm/docs/CommandGuide/index.rst
index 52ad316459d..77fece030eb 100644
--- a/llvm/docs/CommandGuide/index.rst
+++ b/llvm/docs/CommandGuide/index.rst
@@ -74,3 +74,4 @@ Developer Tools
llvm-build
llvm-exegesis
llvm-pdbutil
+ llvm-locstats
diff --git a/llvm/docs/CommandGuide/llvm-locstats.rst b/llvm/docs/CommandGuide/llvm-locstats.rst
new file mode 100644
index 00000000000..434b8c8ed2a
--- /dev/null
+++ b/llvm/docs/CommandGuide/llvm-locstats.rst
@@ -0,0 +1,79 @@
+llvm-locstats - calculate statistics on DWARF debug location
+============================================================
+
+.. program:: llvm-locstats
+
+SYNOPSIS
+--------
+
+:program:`llvm-locstats` [*options*] [*filename*]
+
+DESCRIPTION
+-----------
+
+:program:`llvm-locstats` works like a wrapper around :program:`llvm-dwarfdump`.
+It parses :program:`llvm-dwarfdump` statistics regarding debug location by
+pretty printing it in a more human readable way.
+
+The line 0% shows the number and the percentage of DIEs with no location
+information, but the line 100% shows the information for DIEs where there is
+location information in all code section bytes (where the variable or parameter
+is in the scope). The line 50-59% shows the number and the percentage of DIEs
+where the location information is between 50 and 59 percentage of its scope
+covered.
+
+OPTIONS
+-------
+
+.. option:: -only-variables
+
+ Calculate the location statistics only for local variables.
+
+.. option:: -only-formal-parameters
+
+ Calculate the location statistics only for formal parameters.
+
+.. option:: -ignore-debug-entry-values
+
+ Ignore the location statistics on locations containing the
+ debug entry values DWARF operation.
+
+EXIT STATUS
+-----------
+
+:program:`llvm-locstats` returns 0 if the input file were parsed
+successfully. Otherwise, it returns 1.
+
+OUTPUT EXAMPLE
+--------------
+
+.. code-block:: none
+
+ =================================================
+ Debug Location Statistics
+ =================================================
+ cov% samples percentage(~)
+ -------------------------------------------------
+ 0% 1 16%
+ 1-9% 0 0%
+ 10-19% 0 0%
+ 20-29% 0 0%
+ 30-39% 0 0%
+ 40-49% 0 0%
+ 50-99% 1 16%
+ 60-69% 0 0%
+ 70-79% 0 0%
+ 80-89% 1 16%
+ 90-99% 0 0%
+ 100% 3 50%
+ =================================================
+ -the number of debug variables processed: 6
+ -PC ranges covered: 81%
+ -------------------------------------------------
+ -total availability: 83%
+ =================================================
+
+SEE ALSO
+--------
+
+:manpage:`llvm-dwarfdump(1)`
OpenPOWER on IntegriCloud