The Linux Perf Handbook for C++ Engineers | Ep. 20 | CPP

Опубликовано: 29 Сентябрь 2026
на канале: Last Mile Developer
485
7

Udemy Course: https://cpp.rougeneuron.in

This episode provides a deep dive into Linux Perf, a vital tool for C++ performance analysis. The hosts emphasize moving beyond guesswork by using data to pinpoint bottlenecks. They explain how Perf's deep integration with the Linux kernel and access to hardware counters gives it a unique low-overhead advantage. The discussion covers the core workflow: starting with perf stat for a high-level health check, using perf record to capture detailed samples, and then analyzing the data with perf report and perf annotate. The video also addresses specific C++ challenges like name mangling, inlining, and false sharing, demonstrating the entire process with a practical matrix multiplication case study.

Chapters
00:00 - Introduction to Linux Perf for C++
01:27 - What Makes Linux Perf Unique?
02:17 - The Four Types of Perf Events
03:38 - Dynamic Probes and Causal Analysis
04:31 - Essential Setup for C++ Developers
05:12 - The Perf Stat Workflow: High-Level Analysis
06:42 - The Perf Record Workflow: Capturing Detailed Data
07:56 - Navigating Perf Report & Understanding Overheads
09:13 - Using Perf Annotate to Find the Root Cause
10:18 - Handling Debug Symbols in Production
11:07 - Advanced Tools: Perf Mem & Perf C2C
13:12 - C++ Specifics: Name Mangling & Inlining
14:31 - The Importance of Profiling Optimized Code
15:12 - The Optimization Feedback Loop
17:03 - Case Study: Optimizing Matrix Multiplication
19:39 - Conclusion and Final Thought