File: graphcall.stp

package info (click to toggle)
systemtap 3.0-6~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 30,496 kB
  • sloc: ansic: 57,403; cpp: 57,007; exp: 36,587; sh: 10,151; xml: 7,771; perl: 2,241; python: 1,364; tcl: 1,300; makefile: 825; java: 148; lisp: 105; awk: 94; asm: 91; sed: 16
file content (19 lines) | stat: -rwxr-xr-x 539 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/env stap

# When the output of this script is fed to stapgraph, it produces a
# mousable event line with events at each call of interest. When the
# event is hovered over, the backtrace is displayed in stapgraph.

probe begin
{
    printf("%%DataSet:call 75 ff0000 discreet\n")
    printf("call %%Title:Calls to %s\n", @2)
    printf ("call %%XAxisTitle:Time\n")
    printf ("%%LineEnd:0\n")
}

probe process(@1).function(@2).call {
    printf("call %d ", gettimeofday_ms())
    print_ubacktrace_brief();
    printf("%c", 0)
}