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
Javier Honduvilla Coto
January 01, 2021
Technology
1
50
Understanding Ruby with BPF
Javier Honduvilla Coto
January 01, 2021
Tweet
Share
More Decks by Javier Honduvilla Coto
See All by Javier Honduvilla Coto
Debugging – Learning Linux @ Facebook
javierhonduco
0
110
Spying Linux processes
javierhonduco
0
120
word2vec
javierhonduco
0
83
UC3M university cafeteria redesign
javierhonduco
0
94
Mac OSX UI toolkit and design guidelines
javierhonduco
0
130
Python for Java developers
javierhonduco
0
88
Other Decks in Technology
See All in Technology
コミュニティが持つ「学びと成長の場」としての作用 / RSGT2026
ama_ch
0
190
AIと融ける人間の冒険
pujisi
0
110
複雑さを受け入れるか、拒むか? - 事業成長とともに育ったモノリスを前に私が考えたこと #RSGT2026
murabayashi
1
1.7k
迷わない!AI×MCP連携のリファレンスアーキテクチャ完全ガイド
cdataj
0
420
SES向け、生成AI時代におけるエンジニアリングとセキュリティ
longbowxxx
0
310
モノタロウ x クリエーションラインで実現する チームトポロジーにおける プラットフォームチーム・ ストリームアラインドチームの 効果的なコラボレーション
creationline
0
690
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
640
I tried making a solo advent calendar!
zzzzico
0
150
Redshift認可、アップデートでどう変わった?
handy
1
140
AWS re:Invent 2025 を振り返る
kazzpapa3
2
110
AI に「学ばせ、調べさせ、作らせる」。Auth0 開発を加速させる7つの実践的アプローチ
scova0731
0
200
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
21k
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
51
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
32
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
39
What's in a price? How to price your products and services
michaelherold
246
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
130
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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