2019-10-02 09:00:01 +02:00
|
|
|
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
|
2019-12-11 18:52:49 +01:00
|
|
|
is in the scope). The line [50%,60%) shows the number and the percentage of DIEs
|
|
|
|
where the location information is between 50 and 60 percentage of its scope
|
2019-10-02 09:00:01 +02:00
|
|
|
covered.
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
|
|
|
|
2020-01-13 12:31:28 +01:00
|
|
|
.. option:: --only-variables
|
2019-10-02 09:00:01 +02:00
|
|
|
|
2020-01-13 12:31:28 +01:00
|
|
|
calculate the location statistics only for local variables
|
2019-10-02 09:00:01 +02:00
|
|
|
|
2020-01-13 12:31:28 +01:00
|
|
|
.. option:: --only-formal-parameters
|
2019-10-02 09:00:01 +02:00
|
|
|
|
2020-01-13 12:31:28 +01:00
|
|
|
calculate the location statistics only for formal parameters
|
2019-10-02 09:00:01 +02:00
|
|
|
|
2020-01-13 12:31:28 +01:00
|
|
|
.. option:: --ignore-debug-entry-values
|
2019-10-02 09:00:01 +02:00
|
|
|
|
2020-01-13 12:31:28 +01:00
|
|
|
ignore the location statistics on locations containing the
|
|
|
|
debug entry values DWARF operation
|
2019-10-02 09:00:01 +02:00
|
|
|
|
2020-01-15 11:50:59 +01:00
|
|
|
.. option:: --draw-plot
|
|
|
|
|
|
|
|
make histogram of location buckets generated (requires
|
|
|
|
matplotlib)
|
|
|
|
|
2020-01-15 13:00:14 +01:00
|
|
|
.. option:: --compare
|
|
|
|
|
|
|
|
compare the debug location coverage on two files provided, and draw
|
|
|
|
a plot showing the difference (requires matplotlib)
|
|
|
|
|
2019-10-02 09:00:01 +02:00
|
|
|
EXIT STATUS
|
|
|
|
-----------
|
|
|
|
|
|
|
|
:program:`llvm-locstats` returns 0 if the input file were parsed
|
|
|
|
successfully. Otherwise, it returns 1.
|
|
|
|
|
2020-01-15 11:50:59 +01:00
|
|
|
EXAMPLE 1
|
2019-10-02 09:00:01 +02:00
|
|
|
--------------
|
|
|
|
|
2020-01-15 11:50:59 +01:00
|
|
|
Pretty print the location coverage on the standard output.
|
|
|
|
|
2019-10-02 09:00:01 +02:00
|
|
|
.. code-block:: none
|
|
|
|
|
2020-01-15 11:50:59 +01:00
|
|
|
llvm-locstats a.out
|
|
|
|
|
|
|
|
=================================================
|
|
|
|
Debug Location Statistics
|
|
|
|
=================================================
|
|
|
|
cov% samples percentage(~)
|
|
|
|
-------------------------------------------------
|
|
|
|
0% 1 16%
|
|
|
|
(0%,10%) 0 0%
|
|
|
|
[10%,20%) 0 0%
|
|
|
|
[20%,30%) 0 0%
|
|
|
|
[30%,40%) 0 0%
|
|
|
|
[40%,50%) 0 0%
|
|
|
|
[50%,60%) 1 16%
|
|
|
|
[60%,70%) 0 0%
|
|
|
|
[70%,80%) 0 0%
|
|
|
|
[80%,90%) 1 16%
|
|
|
|
[90%,100%) 0 0%
|
|
|
|
100% 3 50%
|
|
|
|
=================================================
|
|
|
|
-the number of debug variables processed: 6
|
|
|
|
-PC ranges covered: 81%
|
|
|
|
-------------------------------------------------
|
|
|
|
-total availability: 83%
|
|
|
|
=================================================
|
|
|
|
|
|
|
|
EXAMPLE 2
|
|
|
|
--------------
|
|
|
|
|
|
|
|
Generate a plot as an image file.
|
|
|
|
|
|
|
|
.. code-block:: none
|
|
|
|
|
|
|
|
llvm-locstats --draw-plot file1.out
|
|
|
|
|
|
|
|
.. image:: locstats-draw-plot.png
|
|
|
|
:align: center
|
2019-10-02 09:00:01 +02:00
|
|
|
|
2020-01-15 13:00:14 +01:00
|
|
|
EXAMPLE 3
|
|
|
|
--------------
|
|
|
|
|
|
|
|
Generate a plot as an image file showing the difference in the debug location
|
|
|
|
coverage.
|
|
|
|
|
|
|
|
.. code-block:: none
|
|
|
|
|
|
|
|
llvm-locstats --compare file1.out file1.withentryvals.out
|
|
|
|
|
|
|
|
.. image:: locstats-compare.png
|
|
|
|
:align: center
|
|
|
|
|
2019-10-02 09:00:01 +02:00
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
|
|
|
|
:manpage:`llvm-dwarfdump(1)`
|