LLVM-LOCSTATS(1)
π LLVM-LOCSTATS π
okay bestie, welcome to llvm-locstats from the LLVM manual, section 1 (that's the general commands girlies, iykyk) π
β¨ NAME β¨
llvm-locstats β the girl who does math on your DWARF debug location πβ¨
πΈ SYNOPSIS πΈ
llvm-locstats [options] [filename]
π¦ DESCRIPTION π¦
so basically, llvm-locstats is lowkey a wrapper around llvm-dwarfdump π«Ά it parses the stats that llvm-dwarfdump gives you about debug location and pretty-prints them in a way that's actually human readable, because bestie, the raw output is giving cryptic π
here's the tea on the buckets:
- the
0%line? that's the number and the percentage of DIEs with no location information like at all, not a crumb π₯² - the
100%line? that's the DIEs where there IS location information in all code section bytes β as in, where the variable or parameter is actually in the scope π full coverage, main character energy - and the
[50%,60%)line (and all her lil friends) shows the number and percentage of DIEs where the location information covers between 50 and 60 percentage of its scope π«
β¨ OPTIONS β¨
--only-variablesβ only do the location statistics for local variables, that's it, nothing else πΈ--only-formal-parametersβ only do the location statistics for formal parameters π--ignore-debug-entry-valuesβ skip the location statistics for locations that contain the debug entry values DWARF operation, we're ignoring her π--draw-plotβ make a histogram of the location buckets generated (heads up bestie, this one requiresmatplotlib) π--compareβ compare the debug location coverage across two files you provide, and draw a plot showing the difference (again, requiresmatplotlib) π
π EXIT STATUS π
llvm-locstats returns 0 if the input file was parsed successfully π otherwise it returns 1 π
β EXAMPLE 1 β
pretty print the location coverage straight to standard output, no filter, raw vibes:
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, cute little picture moment:
llvm-locstats --draw-plot file1.out
[image]
π EXAMPLE 3 π
generate a plot as an image file that shows the difference in the debug location coverage β the side-by-side slay:
llvm-locstats --compare file1.out file1.withentryvals.out
[image]
π SEE ALSO π
llvm-dwarfdump(1) β her sister, go say hi π«Ά
π AUTHOR π
maintained by the LLVM Team (https://llvm.org/) π§
πΈ COPYRIGHT πΈ
2003-2025, LLVM Project
okay that's the whole page bestie, no cap π this was LLVM-LOCSTATS(1) from the LLVM manual, version 14, dated 2025-05-22 β go forth and stat your debug locations, you absolute icon πβ¨π¦
π¦ where this page comes from
- ubuntu questing: llvm-14 1:14.0.6-20ubuntu3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms