Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: ef4ec6ed12d6c6200a85068f60483723298b6ff4 authored by Ned Deily on 25 March 2019, 20:21:05 UTC
3.7.3
Tip revision: ef4ec6e
gc.stp
global tracing

probe process.mark("function__entry")
{
    funcname = user_string($arg2);

    if (funcname == "start") {
        tracing = 1;
    }
}

probe process.mark("gc__start"), process.mark("gc__done")
{
    if (tracing) {
        printf("%d\t%s:%ld\n", gettimeofday_us(), $$name, $arg1);
    }
}

probe process.mark("function__return")
{
    funcname = user_string($arg2);

    if (funcname == "start") {
        tracing = 0;
    }
}
back to top