Skip to content

A zero-instrumentation, continuous CPU–GPU profiler built in Rust using eBPF. It traces CUDA kernel launches, memory transfers, and synchronization points to help identify CPU↔GPU bottlenecks in production system

Notifications You must be signed in to change notification settings

hamzzy/Aperture

Repository files navigation

Aperture

Rust License

Production-grade distributed profiler for CPU & GPU workloads built with Rust and eBPF

Overview

Aperture is a high-performance profiling system that uses eBPF for low-overhead performance monitoring. The project aims to provide CPU, GPU, lock contention, and syscall profiling in a distributed architecture.

Features (Planned)

  • CPU Profiling: Continuous stack trace sampling with <1% overhead using eBPF
  • Lock Contention: Detect mutex/futex bottlenecks in production
  • Syscall Tracing: Latency histograms for system calls
  • WASM Filters: Programmable event filtering
  • GPU Profiling: CUDA kernel tracing and memory analysis
  • Distributed Architecture: Agent-aggregator model with scalable storage

Repository Structure

aperture/
├── agent/           # Main profiling agent
├── agent-ebpf/      # eBPF programs (kernel space)
├── shared/          # Common types and utilities
├── cli/             # Command-line interface
├── aggregator/      # Central aggregation service (future)
├── wasm-runtime/    # WASM filter runtime (future)
└── gpu-profiler/    # GPU profiling support (future)

Prerequisites

  • Linux kernel 5.8+ with BPF support
  • Rust 1.75+ (stable for userspace, nightly for eBPF programs)
  • LLVM 14+ and Clang
  • Linux headers for your kernel

Getting Started

# Clone the repository
git clone https://github.com/yourusername/aperture.git
cd aperture

# Build the workspace
cargo build --workspace

# Run tests
cargo test --workspace

# Check code quality
cargo clippy --workspace --all-targets
cargo fmt --check

Development

This project is in early development. See docs/roadmap.md for the development plan.

Workspace Crates

  • agent: Main profiling agent that loads eBPF programs and collects performance data
  • agent-ebpf: eBPF programs compiled to BPF bytecode
  • shared: Common types, protocols, and utilities shared across crates
  • cli: Command-line interface for profiling operations
  • aggregator: Distributed aggregation service (future phase)
  • wasm-runtime: WASM-based event filtering (future phase)
  • gpu-profiler: GPU profiling capabilities (future phase)

Contributing

Contributions are welcome! Please see CONTRIBUTING.md once available.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Acknowledgments

Built with:

  • Aya - Rust eBPF library
  • Tokio - Async runtime
  • Inferno - Flamegraph generation

About

A zero-instrumentation, continuous CPU–GPU profiler built in Rust using eBPF. It traces CUDA kernel launches, memory transfers, and synchronization points to help identify CPU↔GPU bottlenecks in production system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages