| 1 |
global pp_no_match=0 |
| 2 |
global matched=0 |
| 3 |
global failedmatch="" |
| 4 |
|
| 5 |
probe begin { |
| 6 |
print("READY\n") |
| 7 |
} |
| 8 |
|
| 9 |
probe module("systemtap_test_module2").function("yyy_func4") { |
| 10 |
printf("fileline %s \n", symfileline(addr())) |
| 11 |
printf("file %s \n", symfile(addr())) |
| 12 |
printf("line %s \n", symline(addr())) |
| 13 |
exit() |
| 14 |
} |
| 15 |
|
| 16 |
probe module("systemtap_test_module2").statement("*@*:*") { |
| 17 |
fileline = "@" |
| 18 |
fileline .= symfileline(addr()) |
| 19 |
if (isinstr(pp(), fileline) != 1){ |
| 20 |
pp_no_match++; |
| 21 |
failedmatch = pp()." ".fileline |
| 22 |
} else { |
| 23 |
matched++ |
| 24 |
} |
| 25 |
} |
| 26 |
probe end { |
| 27 |
if (pp_no_match) |
| 28 |
println("no match: ", pp_no_match, ". last failed match: ", failedmatch) |
| 29 |
else |
| 30 |
println("matched: ", matched) |
| 31 |
} |