Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

error::pass2(7stap) [centos man page]

ERROR::PASS2(7stap)													       ERROR::PASS2(7stap)

NAME
error::pass2 - systemtap pass-2 errors DESCRIPTION
Errors that occur during pass 2 (elaboration) can have a variety of causes. Common types include: unavailable probe point classes Some types of probe points are only available on certain system versions, architectures, and configurations. For example, user- space process.* probes may require utrace or uprobes capability in the kernel for this architecture. unavailable probe points Some probe points may be individually unavailable even when their class is fine. For example, kprobe.function("foobar") may fail if function foobar does not exist in the kernel any more. Debugging or symbol data may be absent for some types of .function or .statement probes; check for availability of debuginfo. Try the stap-prep program to download possibly-required debuginfo. Use a wildcard parameter such as stap -l 'kprobe.function("*foo*")' to locate still-existing variants. Use ! or ? probe point suffixes to denote optional / preferred-alternatives, to let the working parts of a script continue. typos There might be a spelling error in the probe point name ("sycsall" vs. "syscall"). Wildcard probes may not find a match at all in the tapsets. Recheck the names using stap -l PROBEPOINT. Another common mistake is to use the . operator instead of the correct -> when dereferencing context variable subfields or pointers: $foo->bar->baz even if in C one would say foo->bar.baz. unavailable context variables Systemtap scripts often wish to refer to variables from the context of the probed programs using $variable notation. These vari- ables may not always be available, depending on versions of the compiler, debugging/optimization flags used, architecture, etc. Use stap -L PROBEPOINT to list available context variables for given probes. Use the @defined() expression to test for the resolvabil- ity of a context variable expression. Consider using the stap --skip-badvars option to silently replace misbehaving context vari- able expressions with zero. GATHERING MORE INFORMATION
Increasing the verbosity of pass-2 with an option such as --vp 02 can help pinpoint the problem. SEE ALSO
stap(1), stap-prep(1), stapprobes(3stap), probe::*(3stap), error::dwarf(7stap), error::inode-uprobes(7stap), warning::debuginfo(7stap), error::reporting(7stap) ERROR::PASS2(7stap)

Check Out this Related Man Page

STAPEX(3stap)															     STAPEX(3stap)

NAME
stapex - systemtap examples LANGUAGE BASICS
These examples give a feel for basic systemtap syntax and control structures. global odds, evens probe begin { # "no" and "ne" are local integers for (i=0; i<10; i++) { if (i % 2) odds [no++] = i else evens [ne++] = i } delete odds[2] delete evens[3] exit () } probe end { foreach (x+ in odds) { printf ("odds[%d] = %d0, x, odds[x]) } foreach (x in evens-) { printf ("evens[%d] = %d0, x, evens[x]) } } This prints: odds[1] = 1 odds[3] = 5 odds[4] = 7 odds[5] = 9 evens[5] = 8 evens[4] = 6 evens[2] = 2 evens[1] = 0 Note that all variables types are inferred, and that all locals and globals are automatically initialized. This script prints the primes between 0 and 49. function isprime (x) { if (x < 2) return 0 for (i=2; i<x; i++) { if (x % i == 0) return 0 if (i * i > x) break } return 1 } probe begin { for (i=0; i<50; i++) if (isprime (i)) printf("%d0, i) exit() } This script demonstrates recursive functions. function fibonacci(i) { if (i < 1) error ("bad number") if (i == 1) return 1 if (i == 2) return 2 return fibonacci (i-1) + fibonacci (i-2) } probe begin { printf ("11th fibonacci number: %d0, fibonacci(11)) exit () } Any larger number may exceed the MAXACTION or MAXNESTING limits, and result in an error. PROBING
To trace entry and exit from a function, use a pair of probes: probe kernel.function("sys_mkdir") { println ("enter") } probe kernel.function("sys_mkdir").return { println ("exit") } To list the probeable functions in the kernel, use the listings mode. % stap -l 'kernel.function("*")' To list the probeable functions and local variables in the kernel, use another listings mode. % stap -L 'kernel.function("*")' MORE EXAMPLES
The directory to find more examples can be found in the stappaths(7) manual page. SEE ALSO
stap(1) stapprobes(3stap) stapfuncs(3stap) stappaths(7) STAPEX(3stap)
Man Page