The Magic of a Trace
summary
Shows how to use Intel PT via perf and the Magic Trace toolchain to get full execution traces, not samples, and to spot exact causes like a 750 ms re‑auth handshake that explains long tails. Demonstrates a Zig implementation for a billion‑line file reduced from minutes to 2.5 seconds by switching to mmap+madvice, a cheap integer key instead of string hashing, and release optimizations, and a 200‑line Go listener that replaces a Debezium setup, cutting costs from $800 to $200/day and eliminating production bugs.
AI-written summary · about
chapters (10)
- 0:00Introduction to production
- 2:16The limitations of metrics
- 8:55Introduction to Intel PT
- 12:23How Intel PT works
- 18:02Applying Intel PT tracing
- 20:50Solving the 1BRC challenge
- 29:14Optimizing code execution
- 37:04Tracing and framework overhead
- 44:35Case study in latency
- 54:08Conclusion and green computing
related talks
32mProcessor tracing in perf
31mFantastic tracepoints and where to find them
45mPerformance lab. The power of the perf tool!
01h 02mProfiling with Heaptrack and Hotspot on Embedded Linux
45mFast and Safe Production Monitoring of JVM Applications with BPF Magic
34mPostmortem Debugging with Coresight
35mLinux Tracing updates
45mPerf tools updates and beyond
