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