| 1 |
#! stap -p2 |
| 2 |
global p |
| 3 |
function dummy:long () {return p;} |
| 4 |
|
| 5 |
# alias with a condition |
| 6 |
probe alias0 = begin if (3) {p=1} |
| 7 |
# alias with a kernel-variable condition -- not valid |
| 8 |
probe alias1 = kernel.function("vfs_read").return if (0) { if ($return) {p=0} } |
| 9 |
# alias with a function-call condition |
| 10 |
probe blias0 = timer.s(1) if (1 /* dummy() */) {p=10} |
| 11 |
|
| 12 |
# multiple probe point with conditions |
| 13 |
probe alias2 = alias0 if (1), alias1 if (-1) {p=2} |
| 14 |
|
| 15 |
# wildcard with a global-variable condition |
| 16 |
probe *lias0 if (p) {print(p)} |
| 17 |
|
| 18 |
# multi level alias with a condition |
| 19 |
probe alias2 if(4) {print(p)} |
| 20 |
|