$> cat mymod.stp
probe module("mymodule").function("myfunction") {
now_time = gettimeofday_ns()
print(now_time, "\n")
}
When I was trying to register the probe, Systemtap kept failing:
$> sudo stap mymod.stp
semantic error: while resolving probe point: identifier 'module' at mymod.stp:1:7
source: probe module("mymodule").function("myfunction") {
^
semantic error: no match
Pass 2: analysis failed. [man error::pass2]
Yet my module was properly loaded:
$> lsmod | grep mymodule
mymodule 40960 0
And the symbol was valid:
$> grep myfunction /proc/kallsyms
0000000000000000 t myfunction [mymodule]
Turns out you have to actually install the probe under /lib/modules/KERNEL_VERSION for Systemtap to be able to register the probe on it. The final fix:
$> sudo rmmod mymodule
$> sudo install ~/build/mymodule.ko /lib/modules/4.5.0/extra/
$> sudo modprobe mymodule
Be sure to replace 4.5.0 by your current kernel's version:
$> sudo install ~/build/mymodule.ko /lib/modules/`uname -r`/extra/
Follow @mogeb88
Can truly relate and retain this outstanding post. Very well written. qemu linux
ReplyDeletePanduan Cara Bet 2D Togel Klik4D Online yang tersedia di S128cash. Berhubung permainan togel adalah game legendaris di Indonesia, tahukah kamu kalau game togel sekarang bisa dimainkan secara online ? (Baca Selengkapnya Disini...)
ReplyDeleteI would like to say that this blog really convinced me to do it! Thanks, very good post.
ReplyDelete해외안전놀이터