strace: fight for performance
summary
Overview of concrete strace optimizations: enabling single-register read syscall on many architectures cuts dozens of ptrace calls to one, adding process_vm_readv caching avoids repeated page copies when decoding large buffers, and introducing seccomp BPF filters converts many ptrace stops into fast kernel-side returns reducing runtime overhead in traced workloads. A long-standing thread-queueing batch dispatch patch fixes massive slowdowns for fork/clone-heavy programs (carried in RHEL for ~10 years, upstream in strace 5.0), and these changes together deliver measurable multi‑x speedups in realistic cases.
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:35What is strace
- 0:57strace API
- 2:16what strace does
- 3:30optimization
- 4:41architectures
- 10:12optimizations
- 11:03bug
- 11:57shadowing fairness
- 14:28common message
- 15:30stress
- 16:12sidechannel attacks
- 17:48strace comp
- 19:00artificial example
- 19:24short history
- 19:49future
- 20:19by default








