itt-finder analyzes folded stack traces and extracts intra-thread task candidates from them. It includes a helper script, trace.sh, to capture stacks from a live Linux process with perf.
src/: main Rust applicationthird-party/FlameGraph/: Brendan Gregg's FlameGraph tools, used bytrace.shtrace.sh: helper script for tracing a running process and invokingitt-finder
- Rust toolchain with
cargo
- Linux with
perfinstalled sudoaccess forperf recordthird-party/FlameGraphpresent in this repository
If you cloned the repository without submodules, initialize them first:
git submodule update --init --recursiveBuild a release binary with:
cargo build --releaseThe binary will be available at:
./target/release/itt-finder
The main CLI accepts a folded stack file as input:
./target/release/itt-finder <FILE_PATH> [OPTIONS]Key options:
-b, --binary <BINARY>: binary used for symbol resolution-o, --out <OUT>: write JSON output to a file instead of stdout-s, --size <SIZE>: limit the number of reported tasks--tui: launch the interactive task-selection TUI--no-stdlib-exclusion: disable stdlib symbol exclusion
Example:
./target/release/itt-finder results/my-app.folded \
--binary /path/to/my-app \
--out results/my-app.jsontrace.sh automates a common workflow for a running Linux process:
- Record samples with
perf - Collapse stacks into folded format
- Generate a flame graph SVG
- Run
itt-finderon the folded stacks
Basic usage:
bash trace.sh <PID> [OPTIONS]Examples:
bash trace.sh 1234
bash trace.sh 1234 --duration 60
bash trace.sh 1234 --tid 1240
bash trace.sh 1234 --list-threads
bash trace.sh 1234 -x "--size 50"
bash trace.sh 1234 --no-analysis--tid TID: trace a specific thread instead of the main thread--duration SECONDS: trace duration, default30-x, --parser-args ARG: extra arguments forwarded toitt-finder--list-threads: list threads for the target PID and exit--no-analysis: stop after perf capture and flame graph generation
Outputs are written under ./results/ using the process name and PID:
<name>-<pid>.data: rawperf recordoutput<name>-<pid>.folded: folded stack trace<name>-<pid>.svg: flame graph<name>-<pid>.json:itt-finderJSON output, unless--no-analysisis used
The JSON output identifies candidate intra-thread tasks. Use it to guide how LiME's lime-it branch should approach intra-thread task modeling.
trace.shdetects the traced binary from/proc/<pid>/exeand passes it toitt-finderfor symbol resolution.- If the script is run in an interactive terminal, it tries to launch
itt-finder --tui. - If TUI startup fails, it falls back to non-interactive mode automatically.
- The script traces a single thread with
perf record -t.
Build once:
cargo build --releaseInspect a process and list threads:
bash trace.sh 1234 --list-threadsTrace one thread and produce parser output:
bash trace.sh 1234 --tid 1240- If
trace.shsaysperfis missing, install your distribution'sperfpackage. - If
trace.shsaysthird-party/FlameGraphis missing, initialize submodules. - If the folded file is empty, the target may not have been CPU-active during the recording window.
- If the discovered intra-thread tasks are inaccurate, make sure the traced binary is available and includes usable debug symbol information.
This tool is part of the project described in B. Ye, F. Marković, and B. Brandenburg, "Framework-Agnostic Model Inference for Intra-Thread Real-Time Tasks," Proceedings of the 32nd IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS 2026), to appear, May 2026.