Blame SOURCES/systemtap-example.stp

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