Blame SOURCES/systemtap-example.stp

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