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