• Kevin Modzelewski's avatar
    Python-level sampling profiler · 7596e61a
    Kevin Modzelewski authored
    Uses setitimer() to set a recurring signal, and prints
    a Python stacktrace at the next safepoint aka allowGLReadPreemption.
    This is not great since allowGLReadPreemption can happen a decent
    amount later than the signal.  (I'll play around with trying to get
    the signal to be acted on sooner, but it might be better to wait
    for full signal-handling support.)
    
    Still, it seems to provide some decent high-level info.  For example,
    half of the startup time of the django-template benchmark seems to be
    due to regular expressions.
    7596e61a
options.h 2.19 KB