| 1 |
#! /usr/bin/env stap |
| 2 |
|
| 3 |
# When the output of this script is fed to stapgraph, it produces a |
| 4 |
# mousable event line with events at each call of interest. When the |
| 5 |
# event is hovered over, the backtrace is displayed in stapgraph. |
| 6 |
|
| 7 |
probe begin |
| 8 |
{ |
| 9 |
printf("%%DataSet:call 75 ff0000 discreet\n") |
| 10 |
printf("call %%Title:Calls to %s\n", @2) |
| 11 |
printf ("call %%XAxisTitle:Time\n") |
| 12 |
printf ("%%LineEnd:0\n") |
| 13 |
} |
| 14 |
|
| 15 |
probe process(@1).function(@2).call { |
| 16 |
printf("call %d ", gettimeofday_ms()) |
| 17 |
print_ubacktrace_brief(); |
| 18 |
printf("%c", 0) |
| 19 |
} |