diff options
Diffstat (limited to 'samples/tracepoints/tracepoint-probe-sample.c')
-rw-r--r-- | samples/tracepoints/tracepoint-probe-sample.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/samples/tracepoints/tracepoint-probe-sample.c b/samples/tracepoints/tracepoint-probe-sample.c index 9e60eb6..744c0b9 100644 --- a/samples/tracepoints/tracepoint-probe-sample.c +++ b/samples/tracepoints/tracepoint-probe-sample.c @@ -13,7 +13,8 @@ * Here the caller only guarantees locking for struct file and struct inode. * Locking must therefore be done in the probe to use the dentry. */ -static void probe_subsys_event(struct inode *inode, struct file *file) +static void probe_subsys_event(void *ignore, + struct inode *inode, struct file *file) { path_get(&file->f_path); dget(file->f_path.dentry); @@ -23,7 +24,7 @@ static void probe_subsys_event(struct inode *inode, struct file *file) path_put(&file->f_path); } -static void probe_subsys_eventb(void) +static void probe_subsys_eventb(void *ignore) { printk(KERN_INFO "Event B is encountered\n"); } @@ -32,9 +33,9 @@ static int __init tp_sample_trace_init(void) { int ret; - ret = register_trace_subsys_event(probe_subsys_event); + ret = register_trace_subsys_event(probe_subsys_event, NULL); WARN_ON(ret); - ret = register_trace_subsys_eventb(probe_subsys_eventb); + ret = register_trace_subsys_eventb(probe_subsys_eventb, NULL); WARN_ON(ret); return 0; @@ -44,8 +45,8 @@ module_init(tp_sample_trace_init); static void __exit tp_sample_trace_exit(void) { - unregister_trace_subsys_eventb(probe_subsys_eventb); - unregister_trace_subsys_event(probe_subsys_event); + unregister_trace_subsys_eventb(probe_subsys_eventb, NULL); + unregister_trace_subsys_event(probe_subsys_event, NULL); tracepoint_synchronize_unregister(); } |