Expert · Module 14 · Lesson 2 of 4
Profiling With perf and Reading Flame Graphs
Record with linux perf, read report output, build flame graphs, and turn hot stacks into layout and algorithm fixes.
Pro — members onlyAbout 10 minutes
By the end you can
- Record CPU profiles with perf record and read perf report output
- Build and read flame graphs to find hot stacks
- Turn profile data into targeted layout or algorithm changes
Builds on Caches and False Sharing: Layout for Speed.
01 · A question first
The queue benchmark shows a 20 percent gap but the code looks balanced. One function burns cycles, one line misses cache, one stack appears in half the samples. Which commands reveal that stack, and how do you read the graph that proves it?
Make a guess before you read on.
02 · The idea
Members only
Unlock the full lesson
This lesson is part of the membership. Join to read it in full, along with every other premium deep dive.
What's inside
- Start with the problem
- How the idea works
- A repeatable perf loop from record to flame
- Why it is correct
- What it costs
- Pitfalls and variations
- Where it is used
03 · Practice
Asked in interviews
Something wrong with this lesson? Report a problem