Profiling with Heaptrack and Hotspot on Embedded Linux
summary
Shows concrete workflows: use Hotspot + perf (perf record --call-graph dwarf -z ...) to find a string-hashing hotspot that yields a ~4× speedup and a string-allocation change that gives another ~2×; uses perf scheduler-switch tracing to reveal mutex contention and off-CPU waits that shrink after narrowing the lock scope. Uses Heaptrack to intercept every malloc, recording call stacks and exposing >40 million allocations and a memory leak that drops to a 22 KB remainder after fixes. Records raw on-device and interprets on the dev machine.
AI-written summary · about
chapters (6)
- 0:00Profiling tools on Embedded Linux
- 8:10Hotspot and Linux Perf setup
- 13:51CPU profiling with flame graphs
- 32:26Off-CPU profiling for sleep/contention
- 46:36Heaptrack for memory analysis
- 59:18Embedded Linux setup and outlook
related talks
11mHeaptrack: A Heap Memory Profiler for Linux
07mLightning talk- Heaptrack, A Heap Memory Profiler for Linux
48mProfiling data structures
16mBoost workload performance and get more done optimizing native code
31mFantastic tracepoints and where to find them
45mFast and Safe Production Monitoring of JVM Applications with BPF Magic
59mThe Magic of a Trace
45mPerf tools updates and beyond
