LLVM-LOCSTATS(1)
๐ LLVM-LOCSTATS ๐
okay so bestie, welcome to llvm-locstats โ yes it's a real LLVM tool, yes it's lowercase with dashes, and yes it's about to make DWARF debug location data actually make sense to your eyeballs. this is the LLVM manual page, and i'm gonna walk you through every single bit of it, no cap. ๐ซถ
๐ธ NAME ๐ธ
llvm-locstats โ calculate statistics on DWARF debug location
like literally, that's the whole job. it calculates stats. on DWARF debug location. slay. โจ
๐ฆ SYNOPSIS ๐ฆ
llvm-locstats [options] [filename]
that's it. that's the whole vibe. options optional, filename optional, chaos optional. ๐
๐ DESCRIPTION ๐
okay so 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. that's the whole concept and honestly? iconic. it's giving "middle management but make it useful." ๐
now the important part, because these bucket labels are lowkey the main character:
- the line
0%shows the number and the percentage of DIEs with no location 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
so like, 0% = nothing, 100% = fully covered, and the bracket ranges in between = partial coverage. the math is mathing. ๐งฎโจ
โจ OPTIONS โจ
--only-variablesโ calculate the location statistics only for local variables. just the variables, bestie, nobody else invited. ๐--only-formal-parametersโ calculate the location statistics only for formal parameters. parameters-only era. ๐--ignore-debug-entry-valuesโ ignore the location statistics on locations containing the debug entry values DWARF operation. we simply do not perceive them. ๐--draw-plotโ make histogram of location buckets generated (requiresmatplotlib). yes you needmatplotlib, no it's not optional, yes i'm serious. ๐ฅ--compareโ compare the debug location coverage on two files provided, and draw a plot showing the difference (requiresmatplotlib). two files, one plot, dramatic reveal. ๐
๐ EXIT STATUS ๐
llvm-locstats returns 0 if the input file were parsed successfully. otherwise, it returns 1.
that's it. 0 = we ate, 1 = we did not eat. no in-between. ๐ญ
๐ EXAMPLE 1 ๐
pretty print the location coverage on the standard output. look at this gorgeous little table:
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%
=================================================
the way this table just lines up?? obsessed. the buckets go 0%, (0%,10%), then [10%,20%) all the way up through [90%,100%), then 100% โ notice the first bucket after 0% uses parentheses and the rest use brackets, that's not a typo, that's the original, don't @ me. ๐
๐ EXAMPLE 2 ๐
generate a plot as an image file.
llvm-locstats --draw-plot file1.out
[image] ๐ผ๏ธโจ (yes, --draw-plot requires matplotlib, we mentioned that, go install it bestie)
๐ง 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] ๐ผ๏ธ๐ (and yep, --compare also requires matplotlib โ same deal)
๐ฅ SEE ALSO ๐ฅ
llvm-dwarfdump(1) <llvm-dwarfdump.html>
like, the parent tool. the source of the stats. go say hi. ๐ซถ
๐ AUTHOR ๐
maintained by the LLVM Team (https://llvm.org/).
they're the moment. they're the blueprint. ๐
โญ COPYRIGHT โญ
2003-2026, LLVM Project
periodt. ๐ธ
ok bestie that's the whole page โ every option, every bucket, every0and1exit code, every example, all of it, intact. i changed the vibe, not the facts. you're welcome. ๐
โจ mwah โจ this manual page is from LLVM, version 21, dated 2026-05-15 โ that's the footer tea, and honestly it ate. ๐๐ฆ๐
๐ฆ where this page comes from
- fedora 44: llvm21 21.1.8-5.fc44 ยท Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm21 21.1.8-5.fc44 ยท Apache-2.0 WITH LLVM-exception OR NCSA
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms