LLVM-LOCSTATS(1)
π NAME π
okay so bestie, welcome to LLVM-LOCSTATS(1) β the manual page for llvm-locstats, aka your new fave tool for calculating statistics on DWARF debug location. Itβs giving debug-info detective energy, fr fr. π
β¨ 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. No cap, itβs just here to make the numbers make sense. π«Ά
The 0% line shows the number and the percentage of DIEs with no location information, but the 100% line 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. Iconic breakdown behavior, honestly. πΈ
π OPTIONS π
--only-variablesβ calculate the location statistics only for local variables. Just the locals, bestie. π--only-formal-parametersβ calculate the location statistics only for formal parameters. Formal only, very fancy. π--ignore-debug-entry-valuesβ ignore the location statistics on locations containing the debug entry values DWARF operation. Weβre not looking at those entry values today. π--draw-plotβ make histogram of location buckets generated (requires matplotlib). Plot era! πβ¨--compareβ compare the debug location coverage on two files provided, and draw a plot showing the difference (requires matplotlib). Side-by-side slay. π
π₯ EXIT STATUS π₯
llvm-locstats returns 0 if the input file were parsed successfully. Otherwise, it returns 1. Simple as that. π
π 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]
β SEE ALSO β
llvm-dwarfdump(1)β the see-also bestie, go say hi. π«Ά
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). π
πΈ COPYRIGHT πΈ
2003-2023, LLVM Project
π cute sign-off: page 15, dated 2023-07-14, from LLVM, manual LLVM-LOCSTATS(1) β mwah, bestie π
π¦ where this page comes from
- ubuntu jammy: llvm-15 1:15.0.7-0ubuntu0.22.04.3 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms