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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Javier Honduvilla Coto
January 01, 2021
Technology
61
1
Share
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
120
Spying Linux processes
javierhonduco
0
130
word2vec
javierhonduco
0
89
UC3M university cafeteria redesign
javierhonduco
0
100
Mac OSX UI toolkit and design guidelines
javierhonduco
0
150
Python for Java developers
javierhonduco
0
93
Other Decks in Technology
See All in Technology
LLM とプロンプトエンジニアリング/チューターを定義する / LLMs and Prompt Engineering, and Defining Tutors
ks91
PRO
0
400
終盤で崩壊させないAI駆動開発
j5ik2o
2
2.1k
Hello UUID
mimifuwacc
0
140
Zero-Downtime Migration: Moving a Massive, Historic iOS App from CocoaPods to SPM and Tuist without Stopping Feature Delivery
kagemiku
0
240
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
5
14k
2026年、知っておくべき最新 サーバレスTips10選/serverless-10-tips
slsops
12
4.8k
2026年に相応しい 最先端プラグインホストの設計<del>と実装</del>
atsushieno
0
120
Azure Speech で音声対応してみよう
kosmosebi
0
110
2026年度新卒技術研修 サイバーエージェントのデータベース 活用事例とパフォーマンス調査入門
cyberagentdevelopers
PRO
8
8.5k
サイバーフィジカル社会とは何か / What Is a Cyber-Physical Society?
ks91
PRO
0
190
ぼくがかんがえたさいきょうのあうとぷっと
yama3133
0
110
Digitization部 紹介資料
sansan33
PRO
1
7.3k
Featured
See All Featured
Building Adaptive Systems
keathley
44
3k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
130
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Marketing to machines
jonoalderson
1
5.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
340
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Claude Code のすすめ
schroneko
67
220k
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