Performance Profiling
A practical guide to Linux performance profiling - perf stat/record internals and adding custom /proc counters
- Understanding Linux perf: stat and record
What really happens in the kernel when you run perf stat or perf record. - Adding a counter to the *proc* interface
A practical guide to instrumenting the Linux kernel by adding custom counters to /proc/vmstat