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
59
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
120
Spying Linux processes
javierhonduco
0
120
word2vec
javierhonduco
0
86
UC3M university cafeteria redesign
javierhonduco
0
98
Mac OSX UI toolkit and design guidelines
javierhonduco
0
140
Python for Java developers
javierhonduco
0
91
Other Decks in Technology
See All in Technology
Zephyr(RTOS)でOpenPLCを実装してみた
iotengineer22
0
130
RGBに陥らないために -プロダクトの価値を届けるまで-
righttouch
PRO
0
120
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
16k
AI時代のシステム開発者の仕事_20260328
sengtor
0
290
FASTでAIエージェントを作りまくろう!
yukiogawa
4
120
JEDAI認定プログラム JEDAI Order 2026 受賞者一覧 / JEDAI Order 2026 Winners
databricksjapan
0
380
スケーリングを封じられたEC2を救いたい
senseofunity129
0
110
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
190
AIエージェント時代に必要な オペレーションマネージャーのロールとは
kentarofujii
0
160
Sansanの認証基盤を支えるアーキテクチャとその振り返り
sansantech
PRO
1
110
「捨てる」を設計する
kubell_hr
0
410
ADK + Gemini Enterprise で 外部 API 連携エージェント作るなら OAuth の仕組みを理解しておこう
kaz1437
0
210
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
240
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
390
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
WCS-LA-2024
lcolladotor
0
500
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
670
Scaling GitHub
holman
464
140k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
New Earth Scene 8
popppiees
1
1.8k
Accessibility Awareness
sabderemane
0
85
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