LLVM-LOCSTATS(1)
π LLVM-LOCSTATS π
okay bestie, welcome to the llvm-locstats page from the LLVM manual β yes, that LLVM β and it's date night with your debug info. Let's go. π
β¨ NAME β¨
llvm-locstats β calculate statistics on DWARF debug location
πΈ SYNOPSIS πΈ
llvm-locstats [options] [filename]
π¦ DESCRIPTION π¦
So llvm-locstats is basically the bestie who hypes you up by translating. It works like a wrapper around llvm-dwarfdump, and what it does is it takes the stats that llvm-dwarfdump gives you about debug location and pretty prints them in a way that's, like, actually human-readable. no cap, it's giving translator era π
Here's how to read the vibes:
- The line
0%shows the number and the percentage of DIEs with no location information. literally nothing there π - The line
100%shows the information for DIEs where there is location information in all code section bytes β that's where the variable or parameter is in the scope. full coverage, main character behavior π - The line
[50%,60%)shows the number and the percentage of DIEs where the location information covers between 50 and 60 percentage of its scope. halfway there, still iconic
π OPTIONS π
--only-variablesβ only crunch the location statistics for local variables. variables only, no plus-ones--only-formal-parametersβ only crunch the location statistics for formal parameters. parameters get the solo spotlight--ignore-debug-entry-valuesβ skip the location statistics on locations that contain the debug entry values DWARF operation. pretend you didn't see it--draw-plotβ make a histogram of the location buckets generated. requires matplotlib, so yes, you need that installed, bestie--compareβ compare the debug location coverage on two files that you provide, and draw a plot showing the difference. requires matplotlib again, same deal π«Ά
β EXIT STATUS β
llvm-locstats returns 0 if the input file were parsed successfully. Otherwise, it returns 1. bestie said nope π
π₯ EXAMPLE 1 π₯
Pretty print the location coverage on the standard output. Periodt.
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%
=================================================
look at that table go π it ate and left no crumbs
π EXAMPLE 2 π
Generate a plot as an image file. artistic π¨
llvm-locstats --draw-plot file1.out
[image]
π EXAMPLE 3 π
Generate a plot as an image file showing the difference in the debug location coverage. comparison arc
llvm-locstats --compare file1.out file1.withentryvals.out
[image]
π§ SEE ALSO π§
llvm-dwarfdump(1)<llvm-dwarfdump.html>β the original source of the tea, go say hi
π«Ά Author π«Ά
Maintained by the LLVM Team (https://llvm.org/). the whole team, collectively slaying
π Copyright π
2003-2026, LLVM Project
and that's the whole page bestie, mwah π this was LLVM release 22, dated 2026-07-16, and yes the man page really does say LLVM-LOCSTATS(1) at the top and bottom β go read your debug locations, they miss you π¦β¨
π¦ where this page comes from
- fedora 44: llvm 22.1.8-4.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm 22.1.8-4.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms