Skip to content

feat: add offcpu profiling with eBPF#7

Open
btraven00 wants to merge 2 commits intomainfrom
feat/offcpu
Open

feat: add offcpu profiling with eBPF#7
btraven00 wants to merge 2 commits intomainfrom
feat/offcpu

Conversation

@btraven00
Copy link
Owner

No description provided.

Tracks off-cpu time and resolve symbols found in the stack traces.
The ultimate goal is to provide flamegraphs to help visualizing where
the profiled programs are spending time outside of the cpu.

For now, this is an experimental feature that must be enabled with
--features ebpf; I will see if I continue this rabbit hole that I know
basically nothing about.

This PR includes:

- Error detection and reporting for stack trace failures
- Memory map caching with better refresh logic
- Added robust symbolication with multiple resolution methods

1. Interpreter/JIT languages (Python, Java, Node.js) will still have
   limited stack trace support due to their unique memory layouts
2. Kernel stack symbolication requires additional setup (not covered
   here)
3. Some stack frames may still fail to symbolicate if debug info is
   insufficient
@codecov
Copy link

codecov bot commented Jun 22, 2025

Codecov Report

Attention: Patch coverage is 33.71943% with 515 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/process_monitor.rs 48.16% 282 Missing ⚠️
src/symbolication/mod.rs 0.00% 233 Missing ⚠️

📢 Thoughts on this report? Let us know!

@btraven00 btraven00 force-pushed the main branch 12 times, most recently from d257642 to b38d333 Compare July 7, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant