stucked reads a call graph plus one or more stack map files (mapping
function names to stack frame sizes) and reports the maximum stack usage
along a path in the graph. This version adds a friendly command-line
interface and a portable ./configure + make install flow — without
modifying the existing graph and dictionary data structures.
./configure # accepts --prefix=/usr/local, CC=..., CFLAGS=...
make
sudo make install # installs to $prefix/bin and man page to $prefix/share/man/man1To uninstall:
sudo make uninstallstucked [OPTIONS] <callgraph.txt> [stackmap1.txt ...]
Options:
-h, --helpShow help and exit-V, --versionShow version and exit-v, --verboseVerbose logging to stderr-q, --quietOnly print the maximum stack usage (number only)-j, --jsonOutput JSON ({"max_stack": N, "path": ["f1", ...]})-p, --print-pathPrint the function chain (default)
Compute from a call graph and two stack maps:
stucked callgraph.txt stacks_1.txt stacks_2.txtJSON output suitable for tooling:
stucked -j callgraph.txt frames.txtQuiet numeric output (handy in scripts):
stucked -q callgraph.txt frames.txt-
Call graph: must be readable by the existing
read_file()function ingraph.c. -
Stack maps: Each line should contain a function name and a stack size value;
parse_line()instucked.cexpects a colon-delimited format like:<func>:...:...:<stack_size>
.
├── configure
├── Makefile.in
├── man/
│ └── stucked.1
├── docs/
│ └── CLI.md
└── src/
├── stucked.c # CLI-polished main (includes graph.c)
├── graph.c # (unchanged)
└── dictionary.c # (unchanged)
