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
40
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
97
Spying Linux processes
javierhonduco
0
99
word2vec
javierhonduco
0
71
UC3M university cafeteria redesign
javierhonduco
0
86
Mac OSX UI toolkit and design guidelines
javierhonduco
0
120
Python for Java developers
javierhonduco
0
80
Other Decks in Technology
See All in Technology
[SRE NEXT 2025] すみずみまで暖かく照らすあなたの太陽でありたい
carnappopper
2
470
AI エージェントと考え直すデータ基盤
na0
20
7.9k
united airlines ™®️ USA Contact Numbers: Complete 2025 Support Guide
flyunitedhelp
1
470
ClaudeCode_vs_GeminiCLI_Terraformで比較してみた
tkikuchi
1
1k
CDK Vibe Coding Fes
tomoki10
1
630
マルチプロダクト環境におけるSREの役割 / SRE NEXT 2025 lunch session
sugamasao
1
730
セキュアなAI活用のためのLiteLLMの可能性
tk3fftk
1
330
SREのためのeBPF活用ステップアップガイド
egmc
2
1.3k
サイバーエージェントグループのSRE10年の歩みとAI時代の生存戦略
shotatsuge
4
1k
第64回コンピュータビジョン勉強会「The PanAf-FGBG Dataset: Understanding the Impact of Backgrounds in Wildlife Behaviour Recognition」
x_ttyszk
0
240
Microsoft Defender XDRで疲弊しないためのインシデント対応
sophiakunii
1
310
How to Quickly Call American Airlines®️ U.S. Customer Care : Full Guide
flyaahelpguide
0
240
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
25
1.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
The Language of Interfaces
destraynor
158
25k
Code Reviewing Like a Champion
maltzj
524
40k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.2k
Rails Girls Zürich Keynote
gr2m
95
14k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
The Cost Of JavaScript in 2023
addyosmani
51
8.6k
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