Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

llvm-locstats (1)

Name

llvm-locstats - calculate statistics on DWARF debug location

Synopsis

llvm-locstats [options] [filename]

Description

LLVM-LOCSTATS(1)                     LLVM                     LLVM-LOCSTATS(1)



NAME
       llvm-locstats - calculate statistics on DWARF debug location

SYNOPSIS
       llvm-locstats [options] [filename]

DESCRIPTION
       llvm-locstats  works  like  a wrapper around llvm-dwarfdump.  It parses
       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 loca-
       tion 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%,60%)  shows
       the number and the percentage of DIEs where the location information is
       between 50 and 60 percentage of its scope covered.

OPTIONS
       --only-variables
              calculate the location statistics only for local variables

       --only-formal-parameters
              calculate the location statistics only for formal parameters

       --ignore-debug-entry-values
              ignore the location statistics on locations containing the debug
              entry values DWARF operation

       --draw-plot
              make  histogram  of  location  buckets  generated (requires mat-
              plotlib)

       --compare
              compare the debug location coverage on two files  provided,  and
              draw a plot showing the difference (requires matplotlib)

EXIT STATUS
       llvm-locstats  returns  0  if  the input file were parsed successfully.
       Otherwise, it returns 1.

EXAMPLE 1
       Pretty print the location coverage on the standard output.

          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.

          llvm-locstats --draw-plot file1.out
       [image]

EXAMPLE 3
       Generate a plot as an image file showing the difference  in  the  debug
       location coverage.

          llvm-locstats --compare file1.out file1.withentryvals.out
       [image]


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+---------------------+
       |ATTRIBUTE TYPE |  ATTRIBUTE VALUE    |
       +---------------+---------------------+
       |Availability   | developer/llvm/llvm |
       +---------------+---------------------+
       |Stability      | Uncommitted         |
       +---------------+---------------------+

SEE ALSO
       llvm-dwarfdump(1)

AUTHOR
       Maintained by the LLVM Team (https://llvm.org/).

COPYRIGHT
       2003-2022, LLVM Project



NOTES
       Source  code  for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source     was     downloaded    from     https://github.com/llvm/llvm-
       project/releases/download/llvmorg-11.0.0/llvm-11.0.0.src.tar.xz.

       Further information about this software can be found on the open source
       community website at https://llvm.org/.



11                                2022-06-28                  LLVM-LOCSTATS(1)