Blame systemtap-example.stp

e32ce1
/*
e32ce1
    Example usage of the Python systemtap tapset to show a nested view of all
e32ce1
    Python function calls (and returns) across the whole system.
e32ce1
e32ce1
    Run this using
e32ce1
        stap systemtap-example.stp
e32ce1
    to instrument all Python processes on the system, or (for example) using
e32ce1
        stap systemtap-example.stp -c COMMAND
e32ce1
    to instrument a specific program (implemented in Python)
e32ce1
*/
e32ce1
probe python.function.entry
e32ce1
{
e32ce1
  printf("%s => %s in %s:%d\n", thread_indent(1), funcname, filename, lineno);
e32ce1
}
e32ce1
e32ce1
probe python.function.return
e32ce1
{
e32ce1
  printf("%s <= %s in %s:%d\n", thread_indent(-1), funcname, filename, lineno);
e32ce1
}