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