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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Javier Honduvilla Coto
January 01, 2021
Technology
69
1
Share
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
130
Spying Linux processes
javierhonduco
0
130
word2vec
javierhonduco
0
90
UC3M university cafeteria redesign
javierhonduco
0
100
Mac OSX UI toolkit and design guidelines
javierhonduco
0
150
Python for Java developers
javierhonduco
0
95
Other Decks in Technology
See All in Technology
Cloud Run のアップデート 触ってみる&紹介
gre212
0
160
Amazon Bedrock 経由の Claude Cowork を試してみよう・MCP にも繋いでみよう
sugimomoto
0
210
さきさん文庫の書籍ができるまで
sakiengineer
0
260
Typiaで配信JSONの安全性を構造的に担保する(TSKaigi2026)
righttouch
PRO
1
180
『家族アルバム みてね』における インシデント対応との向き合い方 / Approach incident response in Family Album
kohbis
2
230
自作エディターをOSSにして分かった、一人に刺さる開発が世界を動かす理由
shinyasaita
1
440
DI コンテナ自動生成ツールを実装してみた / intro-autodi
uhzz
0
870
Claude Codeですべての日常業務を爆速化しよう!
minorun365
PRO
16
14k
NFLコンペ2026 解法
lycorptech_jp
PRO
0
120
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
320
Claude Code x Accounting
kawaguti
PRO
1
330
ポスター発表&デモと総括 / Poster Presentations & Demonstrations and Summary
ks91
PRO
0
140
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
10
37k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
We Have a Design System, Now What?
morganepeng
55
8.1k
YesSQL, Process and Tooling at Scale
rocio
174
15k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
The Spectacular Lies of Maps
axbom
PRO
1
770
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
370
Build your cross-platform service in a week with App Engine
jlugia
234
18k
How to Ace a Technical Interview
jacobian
281
24k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
380
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