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
45
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
100
Spying Linux processes
javierhonduco
0
110
word2vec
javierhonduco
0
78
UC3M university cafeteria redesign
javierhonduco
0
88
Mac OSX UI toolkit and design guidelines
javierhonduco
0
120
Python for Java developers
javierhonduco
0
81
Other Decks in Technology
See All in Technology
膨大なデータをどうさばく? Java × MQで作るPub/Subアーキテクチャ
zenta
0
120
ローカルLLM基礎知識 / local LLM basics 2025
kishida
23
6.5k
Progressive Deliveryで支える!スケールする衛星コンステレーションの地上システム運用 / Ground Station Operation for Scalable Satellite Constellation by Progressive Delivery
iselegant
1
210
レガシーで硬直したテーブル設計から変更容易で柔軟なテーブル設計にする
red_frasco
4
550
社内外から"使ってもらえる"データ基盤を支えるアーキテクチャの秘訣/登壇資料(飯塚 大地・高橋 一貴)
hacobu
PRO
0
6.1k
LINEヤフー バックエンド組織・体制の紹介
lycorptech_jp
PRO
0
850
AWS re:Invent 2025 で頻出の 生成 AI サービスをおさらい
komakichi
2
210
スタートアップの事業成長を支えるアーキテクチャとエンジニアリング
doragt
1
6.9k
組織の“見えない壁”を越えよ!エンタープライズシフトに必須な3つのPMの「在り方」変革 #pmconf2025
masakazu178
1
790
今すぐGoogle Antigravityを触りましょう
rfdnxbro
0
150
都市スケールAR制作で気をつけること
segur
0
190
自然言語でAPI作業を片付ける!「Postman Agent Mode」
nagix
0
130
Featured
See All Featured
A Tale of Four Properties
chriscoyier
162
23k
Statistics for Hackers
jakevdp
799
230k
Designing for Performance
lara
610
69k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Faster Mobile Websites
deanohume
310
31k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Embracing the Ebb and Flow
colly
88
4.9k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Writing Fast Ruby
sferik
630
62k
Code Reviewing Like a Champion
maltzj
527
40k
We Have a Design System, Now What?
morganepeng
54
7.9k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
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