Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 4082f600a5bd69c8f4a36111fa5eb197d7547756 authored by Ned Deily on 01 October 2019, 17:23:17 UTC
3.7.5rc1
Tip revision: 4082f60
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