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