valgrind had a bunch of stuff like massif, callgrind and memcheck but none of them (AFAIK) tell you how long a function call took, and point out the area of code taking too much time, which perf does.
{
tracer tr(function, ...)
timer ti(tr, milliseconds);
the constructor of the timer would sample and record the time. The destructor would sample the time again, and if it was over the specified milliseconds, it would log a diagnostic into the tracer.I love valgrind/callgrind and it has proven extremely valuable. As always, choose the right tool for the job.