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