Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Understanding Ruby with BPF
Search
Javier Honduvilla Coto
January 01, 2021
Technology
90
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
150
Spying Linux processes
javierhonduco
0
140
word2vec
javierhonduco
0
100
UC3M university cafeteria redesign
javierhonduco
0
110
Mac OSX UI toolkit and design guidelines
javierhonduco
0
180
Python for Java developers
javierhonduco
0
110
Other Decks in Technology
See All in Technology
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
420
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
140
AI時代のPRレビューにどう向き合うか?
kairim0
1
240
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
260
Browser Spec: Testing Hotwire with Ruby
takahashim
1
120
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
SAENM ~Jupyterで残すPoCの試行錯誤、未来の自分と仲間を助ける記録!~
terapyon
0
110
分析AIエージェントを育てる、動く環境を育てる
codatum
1
1.1k
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.8k
USB PDを使ってスマホを労わりたい
raspython3
0
180
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
170
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
360
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Visualization
eitanlees
153
17k
Ruling the World: When Life Gets Gamed
codingconduct
0
400
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
The Curse of the Amulet
leimatthew05
3
16k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
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