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
50
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
110
Spying Linux processes
javierhonduco
0
120
word2vec
javierhonduco
0
82
UC3M university cafeteria redesign
javierhonduco
0
94
Mac OSX UI toolkit and design guidelines
javierhonduco
0
130
Python for Java developers
javierhonduco
0
86
Other Decks in Technology
See All in Technology
Authlete で実装する MCP OAuth 認可サーバー #CIMD の実装を添えて
watahani
0
190
Snowflake導入から1年、LayerXのデータ活用の現在 / One Year into Snowflake: How LayerX Uses Data Today
civitaspo
0
2.5k
障害対応訓練、その前に
coconala_engineer
0
200
LayerX QA Night#1
koyaman2
0
270
Microsoft Agent Frameworkの可観測性
tomokusaba
1
120
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
200
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.9k
Knowledge Work の AI Backend
kworkdev
PRO
0
280
2025-12-27 Claude CodeでPRレビュー対応を効率化する@機械学習社会実装勉強会第54回
nakamasato
4
1.1k
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
330
オープンソースKeycloakのMCP認可サーバの仕様の対応状況 / 20251219 OpenID BizDay #18 LT Keycloak
oidfj
0
190
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Documentation Writing (for coders)
carmenintech
77
5.2k
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
36
Producing Creativity
orderedlist
PRO
348
40k
So, you think you're a good person
axbom
PRO
0
1.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Optimizing for Happiness
mojombo
379
70k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
97
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