File: array_size.stp

package info (click to toggle)
systemtap 3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 32,860 kB
  • ctags: 12,513
  • sloc: cpp: 58,610; ansic: 58,189; exp: 37,322; sh: 10,633; xml: 7,771; perl: 2,252; python: 2,066; tcl: 1,305; makefile: 969; lisp: 105; java: 100; awk: 94; asm: 91; sed: 16
file content (11 lines) | stat: -rwxr-xr-x 333 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
#! stap -p4

# test reading & writing for little, big, and default arrays, with various
# index types mixed in.
global a[1], b[100000], c
probe begin {
    a[42, "foobar"] = "Hello World!"
    b["foo", "bar", "baz", 42] = 314159265
    c[42] = 161803399
    printf("%s %d %d\n", a[42, "foobar"], b["foo", "bar", "baz", 42], c[42])
}