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
73
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
92
UC3M university cafeteria redesign
javierhonduco
0
100
Mac OSX UI toolkit and design guidelines
javierhonduco
0
160
Python for Java developers
javierhonduco
0
99
Other Decks in Technology
See All in Technology
FinOps × AIエージェントで実現する コストインシデントの自動調査
oasis1994liveforever
0
130
攻撃者視点で考えるDetection Engineering
cryptopeg
2
1.5k
AIの性能が向上しても未解決な組織の重大問題は何か?/An Unsolved Organizational Problem in the Age of AI
moriyuya
4
630
2026 TECHFRESH 畢業分享會 - AI-Native 重塑軟體工程與虛擬講師
line_developers_tw
PRO
0
880
【Cyber-sec+】経営層を"動かす"ための考え方
hssh2_bin
0
150
タクシーアプリ『GO』の実践的データ活用
mot_techtalk
3
190
Building applications in the Gemini API family.
line_developers_tw
PRO
0
3.1k
Claude Code×Terraform IaC テンプレート駆動開発
itouhi
1
510
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
130
protovalidate-es を導入してみた
bengo4com
0
180
Microsoft Build Keynoteふりかえり
tomokusaba
0
120
LLMと共に進化するプロセスを目指して
ymatsuwitter
13
4.1k
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
610
4 Signs Your Business is Dying
shpigford
187
22k
Agile that works and the tools we love
rasmusluckow
331
21k
The SEO identity crisis: Don't let AI make you average
varn
0
490
Testing 201, or: Great Expectations
jmmastey
46
8.2k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
240
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
130
Building Adaptive Systems
keathley
44
3k
Mind Mapping
helmedeiros
PRO
1
250
How GitHub (no longer) Works
holman
316
150k
A better future with KSS
kneath
240
18k
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