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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
130
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
ブラウザ研修 2026
recruitengineers
PRO
6
1.1k
つくって納得、つかって実感! 大規模言語モデルことはじめ ver2.0
recruitengineers
PRO
5
1.8k
QAエンジニア起点で進める、SmartHRにおける信頼性向上について
kaomi_wombat
1
150
DatadogのBits Chatが開発組織にもたらしたもの / What Bits Chat Has Brought Us
sms_tech
1
280
[ChatGPT Work LT]事務作業が苦手な人のための バックオフィスの「半」自動化
chimaki_iot
0
310
My broken English still works: speaking at global OSS events
naruoga
0
110
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
事業価値と Engineering 2026年度版
recruitengineers
PRO
50
24k
まちスペース®とデジタルツインと「まちづくり」
hiro_ogi
0
130
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
7.5k
モダンフロントエンド 開発研修
recruitengineers
PRO
4
720
カートの信頼性を担保するWireMockを使ったe2eテスト
ykagano
0
370
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
3
460
The Invisible Side of Design
smashingmag
301
52k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Practical Orchestrator
shlominoach
191
12k
エンジニアに許された特別な時間の終わり
watany
108
250k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
Statistics for Hackers
jakevdp
799
230k
Building the Perfect Custom Keyboard
takai
2
840
The browser strikes back
jonoalderson
0
1.5k
Chasing Engaging Ingredients in Design
codingconduct
0
270
Accessibility Awareness
sabderemane
1
180
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