How exactly does gprof work?
Having just read the paper (again), let me try to explain it. Suppose it takes samples at 100Hz, except not when the process is blocked for IO or some other reason. Each sample records the PC, which is in some function. The count of samples in that function is incremented. So, at the end of … Read more