$30 off During Our Annual Pro Sale. View Details »
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
AgentCoreとStrandsで社内d払いナレッジボットを作った話
motojimayu
1
970
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
2
200
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
1
770
Amazon Connect アップデート! AIエージェントにMCPツールを設定してみた!
ysuzuki
0
140
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
"人"が頑張るAI駆動開発
yokomachi
1
590
障害対応訓練、その前に
coconala_engineer
0
200
アラフォーおじさん、はじめてre:Inventに行く / A 40-Something Guy’s First re:Invent Adventure
kaminashi
0
160
ソフトウェアエンジニアとAIエンジニアの役割分担についてのある事例
kworkdev
PRO
0
260
AR Guitar: Expanding Guitar Performance from a Live House to Urban Space
ekito_station
0
230
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
460
松尾研LLM講座2025 応用編Day3「軽量化」 講義資料
aratako
7
3.8k
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
Claude Code のすすめ
schroneko
67
210k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
200
For a Future-Friendly Web
brad_frost
180
10k
Being A Developer After 40
akosma
91
590k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Discover your Explorer Soul
emna__ayadi
2
1k
Building AI with AI
inesmontani
PRO
1
570
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
980
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