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
76
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
94
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工学特論: MLOps・継続的評価
asei
11
3.1k
AI Agent を本番環境へ―― Microsoft Foundry × Azure Serverless で作る Enterprise-Ready な基盤
shibayan
PRO
1
910
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
170
論語・武士道・産業革命から見る かわるもの、かわらないもの
ichimichi
8
1.9k
reFACToring
moznion
1
1k
ウォーターフォール開発案件のPMとしてAI活用を模索している話
hatahata021
2
230
事業成長とAI活用を止めないデータ基盤アーキテクチャの設計思想
hiracky16
0
780
エンタープライズデータへ安全につなぐ Production-ready なエージェント設計 ― AI × MCP リファレンスアーキテクチャ ― #AIDevDay
cdataj
1
360
VPCセキュリティ対応の最新事情
nagisa53
2
350
システム監視入門
grimoh
5
770
AI ネイティブな組織に Gemini Enterprise Agent Platform がなぜ必要なのか
asei
0
110
Escolhendo LLMs na Prática: Lições Reais em Busca Agêntica no Mercado Livre —TDC 2026 Floripa
jpbonson
0
110
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
360
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
The Language of Interfaces
destraynor
162
27k
Writing Fast Ruby
sferik
630
63k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
270
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
280
4 Signs Your Business is Dying
shpigford
187
22k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Deep Space Network (abreviated)
tonyrice
0
240
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
340
Exploring anti-patterns in Rails
aemeredith
3
450
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