| 1 |
#! stap -wp2 |
| 2 |
|
| 3 |
# This causes a mix of kretprobe-data-pouch and global-map |
| 4 |
# approaches for saving entry values. |
| 5 |
# |
| 6 |
# During development I found that kretprobe would add a call block without |
| 7 |
# setting up _dwarf_tvar_tid, and then global-map would neglect to create the |
| 8 |
# tid as it appended. |
| 9 |
# |
| 10 |
# We try it in both orders here to make sure they don't interfere either way. |
| 11 |
# |
| 12 |
# NB: now that stap emits warnings for $var use in .return probes, this test |
| 13 |
# is more moot, because there's no easy way to suppress just that warning |
| 14 |
# but not the older one. Switching to stap -w from -W. |
| 15 |
# |
| 16 |
probe kernel.function("do_filp_open").return !, |
| 17 |
kernel.function("filp_open").return |
| 18 |
{ |
| 19 |
println(kernel_string(@defined($pathname) ? $pathname : $filename)) |
| 20 |
println(get_cycles() - @entry(get_cycles())) |
| 21 |
} |
| 22 |
|
| 23 |
probe kernel.function("do_filp_open").return !, |
| 24 |
kernel.function("filp_open").return |
| 25 |
{ |
| 26 |
println(get_cycles() - @entry(get_cycles())) |
| 27 |
println(kernel_string(@defined($pathname) ? $pathname : $filename)) |
| 28 |
} |