torsava / rpms / python3

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