brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 7f436c1 Raw
119 lines · plain
1llvm-locstats - calculate statistics on DWARF debug location2============================================================3 4.. program:: llvm-locstats5 6SYNOPSIS7--------8 9:program:`llvm-locstats` [*options*] [*filename*]10 11DESCRIPTION12-----------13 14:program:`llvm-locstats` works like a wrapper around :program:`llvm-dwarfdump`.15It parses :program:`llvm-dwarfdump` statistics regarding debug location by16pretty printing it in a more human-readable way.17 18The line 0% shows the number and the percentage of DIEs with no location19information, but the line 100% shows the information for DIEs where there is20location information in all code section bytes (where the variable or parameter21is in the scope). The line [50%,60%) shows the number and the percentage of DIEs22where the location information is between 50 and 60 percentage of its scope23covered.24 25OPTIONS26-------27 28.. option:: --only-variables29 30            calculate the location statistics only for local variables31 32.. option:: --only-formal-parameters33 34            calculate the location statistics only for formal parameters35 36.. option:: --ignore-debug-entry-values37 38            ignore the location statistics on locations containing the39            debug entry values DWARF operation40 41.. option:: --draw-plot42 43            make histogram of location buckets generated (requires44            matplotlib)45 46.. option:: --compare47 48            compare the debug location coverage on two files provided, and draw49            a plot showing the difference (requires matplotlib)50 51EXIT STATUS52-----------53 54:program:`llvm-locstats` returns 0 if the input file were parsed55successfully. Otherwise, it returns 1.56 57EXAMPLE 158--------------59 60Pretty print the location coverage on the standard output.61 62.. code-block:: none63 64  llvm-locstats a.out65 66    =================================================67              Debug Location Statistics68    =================================================69          cov%          samples       percentage(~)70    -------------------------------------------------71       0%                    1              16%72       (0%,10%)              0               0%73       [10%,20%)             0               0%74       [20%,30%)             0               0%75       [30%,40%)             0               0%76       [40%,50%)             0               0%77       [50%,60%)             1              16%78       [60%,70%)             0               0%79       [70%,80%)             0               0%80       [80%,90%)             1              16%81       [90%,100%)            0               0%82       100%                  3              50%83    =================================================84    -the number of debug variables processed: 685    -PC ranges covered: 81%86    -------------------------------------------------87    -total availability: 83%88    =================================================89 90EXAMPLE 291--------------92 93Generate a plot as an image file.94 95.. code-block:: none96 97  llvm-locstats --draw-plot file1.out98 99.. image:: locstats-draw-plot.png100  :align: center101 102EXAMPLE 3103--------------104 105Generate a plot as an image file showing the difference in the debug location106coverage.107 108.. code-block:: none109 110  llvm-locstats --compare file1.out file1.withentryvals.out111 112.. image:: locstats-compare.png113  :align: center114 115SEE ALSO116--------117 118:manpage:`llvm-dwarfdump(1)`119