Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Understanding Ruby with BPF
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Javier Honduvilla Coto
January 01, 2021
Technology
80
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Understanding Ruby with BPF
Javier Honduvilla Coto
January 01, 2021
More Decks by Javier Honduvilla Coto
See All by Javier Honduvilla Coto
Debugging – Learning Linux @ Facebook
javierhonduco
0
140
Spying Linux processes
javierhonduco
0
140
word2vec
javierhonduco
0
99
UC3M university cafeteria redesign
javierhonduco
0
110
Mac OSX UI toolkit and design guidelines
javierhonduco
0
170
Python for Java developers
javierhonduco
0
100
Other Decks in Technology
See All in Technology
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
0
190
Benchmarking Vector Databases: pgvector vs. LanceDB
tsho
0
150
GoCon2026 - Open Source, Open World
sanposhiho
1
210
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
0
270
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
0
450
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
1
160
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
110
PfEingのアプローチで働こう
rindrics
0
200
データエンジニアの困りごとをDevinと一緒に解消する
10xinc
2
850
Guerilla InnerSource in enterprises, during the AI hype
onenashev
PRO
0
150
When Does a Local Qwen Start to Break
morshoto
0
190
生成AI時代の クレデンシャルとパーミッション設計
nrinetcom
PRO
4
1.6k
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Designing for Performance
lara
611
70k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Discover your Explorer Soul
emna__ayadi
2
1.3k
How to make the Groovebox
asonas
2
2.4k
Accessibility Awareness
sabderemane
1
200
The browser strikes back
jonoalderson
0
1.6k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Limits of Empathy - UXLibs8
cassininazir
1
640
Transcript
rbperf: Understanding Ruby with BPF Javier Honduvilla Coto <
[email protected]
> October
28th-29th, 2020
Why BPF?
Why BPF? - Flexibility
Why BPF? - Flexibility - Low overhead
Why BPF? - Flexibility - Low overhead - Continuous profiling
Why BPF? - Flexibility - Low overhead - Continuous profiling
- No modifications of the tracee
rbperf
rbperf - Profile Ruby programs
rbperf - Profile Ruby programs - Trace complex Ruby programs
execution
rbperf – on-CPU profiling - $ rbperf record --pid=124 cpu
- $ rbperf report [...]
rbperf – Rails on-CPU profile
rbperf – tracing write(2) calls - $ rbperf record \
--pid=124 event \ --tracepoint=syscalls:sys_enter_write - $ rbperf report [...]
Architecture 2. Event (timer, syscall, etc) BPF code (bpf/rbperf.c) Read
frame Driver (rbperf.py) 1. Adds info (pid to profile, thread address) 3. Receives stacktrace 4. Serialisation and persistence BPF tail-calls Bounded loop
Challenges - Implementing the stack walking for a dynamic language
Challenges - Implementing the stack walking for a dynamic language
- Supporting multiple Ruby versions
Challenges - Implementing the stack walking for a dynamic language
- Supporting multiple Ruby versions - Correctness testing
Challenges - Implementing the stack walking for a dynamic language
- Supporting multiple Ruby versions - Correctness testing - BPF safety features
Future plans - Integrate in Facebook’s profiling infra - Rewrite
OSS driver program - Make the OSS version awesome - Better documentation (including how to measure overhead) - Add more output formats - Open source GDB / drgn helper - Other tools? - Containers support? - Support request-oriented workloads?
Thanks! :) https://github.com/facebookexperimental/rbperf
[email protected]
@javierhonduco