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