LLVM-LOCSTATS(1)
π llvm-locstats β the manual page, but make it cute
okay bestie, welcome to llvm-locstats (from the LLVM manual, section 1) β the little tool that does the math on your DWARF debug location info so you don't have to squint at raw numbers. β¨
πΈ NAME πΈ
llvm-locstats β calculate statistics on DWARF debug location
π SYNOPSIS π
llvm-locstats [options] [filename]
π¦ DESCRIPTION π¦
So here's the tea: llvm-locstats is basically a glow-up wrapper around llvm-dwarfdump. π«Ά It parses the debug location statistics that llvm-dwarfdump spits out and pretty prints them in a way that's actually human readable. It's giving translator. It's giving I got you.
Now, the buckets. Let's decode them:
- The 0% line shows you the number and the percentage of DIEs with no location information at all. π
- The 100% line shows the info for DIEs where there is location information in all code section bytes (like, where the variable or parameter is actually in the scope). π
- The [50%,60%) line shows the number and the percentage of DIEs where the location information covers between 50 and 60 percentage of its scope. Math but make it cute.
β¨ 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 a histogram of the location buckets generated (requires matplotlib) π--compareβ compare the debug location coverage on two files you provide, and draw a plot showing the difference (requires matplotlib) π₯
π EXIT STATUS π
llvm-locstats returns 0 if the input file was parsed successfully. Otherwise it returns 1. No in-between, bestie, it's a binary situation.
π 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) β go say hi, it's the whole reason this works π
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/).
π COPYRIGHT π
2003-2024, LLVM Project
no cap, that's the whole page. every flag, every bucket, every percentage β all accounted for. π
and that's a wrap, bestie!! this page is page 12, dated 2024-07-18, from the LLVM manual β you ate that, go run some stats π¦β¨π
π¦ where this page comes from
- fedora 43: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 43: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 44: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 44: llvm12 12.0.1-12.fc41 Β· NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms