1LLVM-LOCSTATS(1)                     LLVM                     LLVM-LOCSTATS(1)
2
3
4

NAME

6       llvm-locstats - calculate statistics on DWARF debug location
7

SYNOPSIS

9       llvm-locstats [options] [filename]
10

DESCRIPTION

12       llvm-locstats  works  like  a wrapper around llvm-dwarfdump.  It parses
13       llvm-dwarfdump statistics regarding debug location by  pretty  printing
14       it in a more human readable way.
15
16       The  line  0% shows the number and the percentage of DIEs with no loca‐
17       tion information, but the line 100%  shows  the  information  for  DIEs
18       where  there  is  location information in all code section bytes (where
19       the variable or parameter is in the scope). The  line  [50%,60%)  shows
20       the number and the percentage of DIEs where the location information is
21       between 50 and 60 percentage of its scope covered.
22

OPTIONS

24       --only-variables
25              calculate the location statistics only for local variables
26
27       --only-formal-parameters
28              calculate the location statistics only for formal parameters
29
30       --ignore-debug-entry-values
31              ignore the location statistics on locations containing the debug
32              entry values DWARF operation
33
34       --draw-plot
35              make  histogram  of  location  buckets  generated (requires mat‐
36              plotlib)
37
38       --compare
39              compare the debug location coverage on two files  provided,  and
40              draw a plot showing the difference (requires matplotlib)
41

EXIT STATUS

43       llvm-locstats  returns  0  if  the input file were parsed successfully.
44       Otherwise, it returns 1.
45

EXAMPLE 1

47       Pretty print the location coverage on the standard output.
48
49          llvm-locstats a.out
50
51            =================================================
52                      Debug Location Statistics
53            =================================================
54                  cov%          samples       percentage(~)
55            -------------------------------------------------
56               0%                    1              16%
57               (0%,10%)              0               0%
58               [10%,20%)             0               0%
59               [20%,30%)             0               0%
60               [30%,40%)             0               0%
61               [40%,50%)             0               0%
62               [50%,60%)             1              16%
63               [60%,70%)             0               0%
64               [70%,80%)             0               0%
65               [80%,90%)             1              16%
66               [90%,100%)            0               0%
67               100%                  3              50%
68            =================================================
69            -the number of debug variables processed: 6
70            -PC ranges covered: 81%
71            -------------------------------------------------
72            -total availability: 83%
73            =================================================
74

EXAMPLE 2

76       Generate a plot as an image file.
77
78          llvm-locstats --draw-plot file1.out
79       [image]
80

EXAMPLE 3

82       Generate a plot as an image file showing the difference  in  the  debug
83       location coverage.
84
85          llvm-locstats --compare file1.out file1.withentryvals.out
86       [image]
87

SEE ALSO

89       llvm-dwarfdump(1)
90

AUTHOR

92       Maintained by the LLVM Team (https://llvm.org/).
93
95       2003-2022, LLVM Project
96
97
98
99
10013                                2022-02-02                  LLVM-LOCSTATS(1)
Impressum