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
69
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
130
Spying Linux processes
javierhonduco
0
130
word2vec
javierhonduco
0
90
UC3M university cafeteria redesign
javierhonduco
0
100
Mac OSX UI toolkit and design guidelines
javierhonduco
0
150
Python for Java developers
javierhonduco
0
95
Other Decks in Technology
See All in Technology
OpenClawとHermesAgentでAI新入社員を作った話
takanoriyanada
0
120
大学生が本気でDatabricksを活用してDiscordサークルをデータ駆動させてみた
phantomjuju
0
200
Claude Code x Accounting
kawaguti
PRO
1
330
Anthropic AIネイティブ・スタートアップ構築のプレイブック を理解する
nagatsu
0
190
checker.tsにチキンレースを仕掛けてみた:型エラー(TS2589)が発生する境界線を求めて
hal_spidernight
1
210
インフラが苦手でも大丈夫! 紙芝居 Kubernetes -WWGT 10周年編-
aoi1
1
260
long-running-tasks
cipepser
2
400
データ分析基盤の信頼を支える視点と設計
yuki_saito
1
710
【ハノーバーメッセ振り返りイベントat名古屋】データは集約からAI起点の収集に ~組織内・組織間でのデータ連携~
tanakaseiya
0
130
TypeScript の型で副作用の実行順序を制御する
yanaemon
2
240
Javaコミュニティをもっと楽しむための9箇条
takasyou
0
260
Claude Codeですべての日常業務を爆速化しよう!
minorun365
PRO
16
14k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
210k
Making Projects Easy
brettharned
120
6.6k
Typedesign – Prime Four
hannesfritz
42
3k
Technical Leadership for Architectural Decision Making
baasie
3
380
So, you think you're a good person
axbom
PRO
2
2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Utilizing Notion as your number one productivity tool
mfonobong
4
310
Ethics towards AI in product and experience design
skipperchong
2
290
HDC tutorial
michielstock
2
670
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
230
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