Blame SOURCES/systemtap-example.stp

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