[Bug kprobes/2152] jprobe variant to run handler instead of probed function
srinivasa at in dot ibm dot com
sourceware-bugzilla@sourceware.org
Sat Feb 17 11:40:00 GMT 2007
------- Additional Comments From srinivasa at in dot ibm dot com 2007-02-17 11:39 -------
Jprobe module should have jprobe_nop_retun in its function and "return" is
also required.
An example is here
int jversion_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
jprobe_nop_return();
return 0;
}
static struct jprobe my_jprobe = {
.entry = JPROBE_ENTRY(jversion_read_proc)
};
static int __init jprobe_init(void)
{
int ret;
my_jprobe.kp.symbol_name = "version_read_proc";
if ((ret = register_jprobe(&my_jprobe)) <0) {
printk("register_jprobe failed, returned %d\n", ret);
return -1;
}
printk("Planted jprobe at %p, handler addr %p\n",
my_jprobe.kp.addr, my_jprobe.entry);
return 0;
}
static void __exit jprobe_exit(void)
{
unregister_jprobe(&my_jprobe);
printk("jprobe unregistered\n");
}
module_init(jprobe_init)
module_exit(jprobe_exit)
MODULE_LICENSE("GPL");
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2152
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Systemtap
mailing list