5G Performance Engineering — DPDK, eBPF, and Line-Rate Telecom · Pro
The Linux perf tool is the standard CPU profiler for native code on Linux. It uses hardware performance monitoring unit (PMU) counters to sample the program counter at a configurable rate, typically 99 Hz to avoid synchronization with periodic timer interrupts. At each sample, perf walks the call stack and records the function names. After many samples, the aggregated stacks indicate where the program spent its CPU time. perf record captures a profile; perf report displays it as a textual breakdown. For an Open5GS UPF burning 100% on one core, perf record -F 99 -g -p <pid> -- sleep 30 then…