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