4dad76
/*
4dad76
    Example of the perl systemtap tapset shows a nested view of perl subroutine
4dad76
    calls and returns across the whole system.
4dad76
4dad76
    To run:
4dad76
        stap perl-example.stp (for all perl processes)
4dad76
    For specific perl process:
4dad76
        stap perl-example.stp -c COMMAND
4dad76
*/
4dad76
4dad76
probe perl.sub.call
4dad76
{
4dad76
    printf("%s => sub: %s, filename: %s, line: %d, package: %s\n",
4dad76
        thread_indent(1), sub, filename, lineno, package)
4dad76
}
4dad76
4dad76
probe perl.sub.return
4dad76
{
4dad76
    printf("%s <= sub: %s, filename: %s, line: %d, package: %s\n",
4dad76
        thread_indent(-1), sub, filename, lineno, package)
4dad76
}