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
30
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
78
Spying Linux processes
javierhonduco
0
91
word2vec
javierhonduco
0
59
UC3M university cafeteria redesign
javierhonduco
0
78
Mac OSX UI toolkit and design guidelines
javierhonduco
0
110
Python for Java developers
javierhonduco
0
76
Other Decks in Technology
See All in Technology
ドメイン駆動設計の実践により事業の成長スピードと保守性を両立するショッピングクーポン
lycorptech_jp
PRO
12
2k
Godot Engineについて調べてみた
unsoluble_sugar
0
400
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
20250116_JAWS_Osaka
takuyay0ne
2
200
技術に触れたり、顔を出そう
maruto
1
150
I could be Wrong!! - Learning from Agile Experts
kawaguti
PRO
8
3.4k
embedパッケージを深掘りする / Deep Dive into embed Package in Go
task4233
1
210
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
360
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
190
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
180
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
1
140
Unsafe.BitCast のすゝめ。
nenonaninu
0
200
Featured
See All Featured
Building Your Own Lightsaber
phodgson
104
6.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Scaling GitHub
holman
459
140k
Faster Mobile Websites
deanohume
305
30k
A designer walks into a library…
pauljervisheath
205
24k
How to Ace a Technical Interview
jacobian
276
23k
Building Adaptive Systems
keathley
38
2.4k
The Cult of Friendly URLs
andyhume
78
6.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
960
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
Thoughts on Productivity
jonyablonski
68
4.4k
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