Tracing, Profiling & Debugging in Production (eBPF)
summary
Live-attach profilers let you inspect running Python with no restart: py-spy (ptrace-based, samples ~100 Hz) produces interactive SVG flame graphs and shows which functions dominate; ptrace/eBPF approaches can read CPython frame structs to get exact stacks; pysnooper traces line-by-line with variable values for precise debugging; eBPF/BPFtrace can count every invocation in-kernel with very low overhead but needs a recent kernel and Python build supporting USDT probes.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 2:03Overview
- 3:45Profiling
- 6:00Function Hierarchy
- 6:45InProcess Profiling
- 8:42External Profiling
- 10:20Python Thread State
- 13:07PiSpy
- 16:40PiFlame
- 20:34PI Snooper
- 24:43Trace Point
- 28:21Poll Results
related talks
25mKernel tracing with BPF
38mLinux Kernel Tracing Using eBPF
21mFrom PyPerf to py-spy - Everything You Need to Know About Python Profilers
27mLow-Overhead Tracing Using eBPF for Observability into Kubernetes Apps and Services
36mDebugging with eBPF on Arm Platforms
34mTrace-Profiling: A New Way About How to Track Application Behavior
24mDebuggers and eBPF: Bringing Debugging to Production
33mInto the flamegraph: From the primitives through advanced concepts
