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