Blame SOURCES/systemtap-example.stp

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