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