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
77
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
130
word2vec
javierhonduco
0
96
UC3M university cafeteria redesign
javierhonduco
0
110
Mac OSX UI toolkit and design guidelines
javierhonduco
0
170
Python for Java developers
javierhonduco
0
99
Other Decks in Technology
See All in Technology
Apache Icebergインフラストラクチャ:ストレージ・カタログ・エンジンの選択肢とClouderaプラットフォームでの実装
tsugiyama
0
120
MulticaとPi Coding Agentで、小規模OSSを30本同時運用した流れ
eiei114
0
130
小粒でもパワフルなJS Runtime Antjsについて
comamoca
0
110
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
560
SmartHR Engineering Team Deck
smarthr
1
3k
【GCC2026】鉄拳8でのVFX開発事例
bandainamcostudios
PRO
0
120
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
430
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
強化学習「理論」入門
enakai00
3
3.6k
DatadogのBits Chatが開発組織にもたらしたもの / What Bits Chat Has Brought Us
sms_tech
1
290
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
tamachi.go 誕生の裏側
rymiyamoto
1
160
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Unsuck your backbone
ammeep
672
58k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
720
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
700
Making the Leap to Tech Lead
cromwellryan
135
10k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Crafting Experiences
bethany
1
260
Paper Plane (Part 1)
katiecoart
PRO
1
10k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
440
Practical Orchestrator
shlominoach
191
12k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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