cilium

A tool for exploring where BPF stack usage comes from

19
0
100% credibility
Found May 05, 2026 at 19 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Go
AI Summary

Stackwhere analyzes compiled BPF programs to reveal stack memory usage per function and variable from debug information.

How It Works

1
💡 Discover the tool

While troubleshooting why your kernel program exceeds memory limits, you find stackwhere on GitHub to pinpoint stack usage.

2
📥 Get the tool

Download the ready-to-use program for your computer from the releases page and place it somewhere handy.

3
🔧 Prepare your program

Rebuild your program including extra details so the tool can see inside it.

4
🔍 Scan all parts

Run the tool on your program file to instantly see the peak memory use for each section, sorted from biggest to smallest.

5
📊 Dive deeper

Choose one busy section and ask the tool for a breakdown of exactly which pieces use memory and where.

Optimize successfully

Spot the memory hogs, tweak your code like shortening lives of variables or splitting work, and fit comfortably under limits.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 19 to 19 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is stackwhere?

Stackwhere is a Go CLI tool for exploring BPF stack usage in object files. It analyzes DWARF debug info from .o files (compiled with -g, unstripped) to pinpoint peak stack per program and map stack slots to source variables, offsets, and lines—revealing what comes from locals, spills, or args under the verifier's 512-byte limit. Download binaries from GitHub releases or go install for Linux, Windows, Darwin.

Why is it gaining traction?

BPF devs hit stack limits often, but compilers hide optimizations; this github tool delivers precise breakdowns like "R10-16: 8 bytes var @ bpf.c:12", grouped by offset with reuse notes. Collection mode scans all programs fast; program mode drills into one. Includes tips like shortening lifetimes or splitting tail calls—practical for real cuts without verifier hikes.

Who should use this?

eBPF programmers rejecting on stack usage in networking (Cilium-style) or tracing progs. Kernel devs optimizing tail calls, bpf-to-bpf functions, or per-CPU maps. Security tool authors pushing complex logic into BPF.

Verdict

Worth adding to your BPF toolkit if stack woes bite—19 stars and 1.0% credibility score signal early days, but Cilium-backed docs, goreleaser binaries, and focused CLI make it immediately useful over guesswork. Test on your .o files today.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.