Motivation
Suppose you want to benchmark a piece of your code, say function foo that takes in average a couple hundreds of nanoseconds to run but it is showing large spikes into the microsecond and sometimes even in the millisecond range. You want to understand better what is happening.
Linux perf won’t do it for you since it is a sampler and not a coun…