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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
93
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
『AIに負けない』より『AIと遊ぶ』」〜ワクワクが最強のテスト・QA学習戦略_公開用
odan611
1
380
5分でわかるDuckDB Quack
chanyou0311
4
310
Text-to-SQLをAgentCoreで実現し、生成されるSQLの精度を定量的に評価する
yakumo
2
540
スタートアップにおけるアジャイルの実践について #shibuyagile
murabayashi
3
2.1k
Baseline対応のDOMの型定義を作った
uhyo
3
680
AIで政治は変わるのか? — 中高生と考えたAI時代の民主主義(東海高校サタデープログラム)
eitarosuda
0
390
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
8k
10x Speed With QA Agent Platform - How we scaled adoption from individual effort to organizational capability
lycorptech_jp
PRO
0
130
組織における AI-DLC 実践
askul
0
310
勉強会企画をアプリで構造化してみた 〜そこで見えた、AIとの付き合い方〜 / I've structured a study group plan using an app.
pauli
0
310
証券システムを10年Scalaで作り続けるということ - 関数型まつり2026
krrrr38
1
360
はてなのサービス基盤を支える Kubernetes《足腰》
masayoshimaezawa
0
440
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1.2k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
210
Product Roadmaps are Hard
iamctodd
55
12k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
440
sira's awesome portfolio website redesign presentation
elsirapls
0
290
Documentation Writing (for coders)
carmenintech
77
5.4k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
200
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The SEO identity crisis: Don't let AI make you average
varn
0
510
Navigating Weather and Climate Data
rabernat
0
270
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
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