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