Converter of a Stats object to input suitable for KCacheGrind.
def
profile(f, *args, **kwds):
Run a function profile.
Exceptions are not caught: If you need stats even when exceptions are to be
raised, pass in a closure that will catch the exceptions and transform them
appropriately for your driver function.