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
87
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
Why we keep our community?
kawaguti
PRO
0
330
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
150
SaaSに宿る21g
kanyamaguc
2
180
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
150
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
120
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
4
1.3k
ブラックボックス化したMLシステムのVertex AI移行 / mlops_community_62
visional_engineering_and_design
1
220
出版記念イベントin大阪「書籍紹介&私がよく使うMCPサーバー3選と社内で安全に活用する方法」
kintotechdev
0
100
AI時代のオンプレ-クラウドキャリアチェンジ考
yuu0w0yuu
0
570
How to install a gem
indirect
0
1.8k
GitHub Copilot CLI で Azure Portal to Bicep
tsubakimoto_s
0
280
「捨てる」を設計する
kubell_hr
0
440
Featured
See All Featured
Mind Mapping
helmedeiros
PRO
1
130
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
150
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
250
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
130
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
350
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
310
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
160
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
200
Deep Space Network (abreviated)
tonyrice
0
97
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