diff options
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/tracepoints/tp-samples-trace.h | 4 | ||||
| -rw-r--r-- | samples/tracepoints/tracepoint-probe-sample.c | 1 | ||||
| -rw-r--r-- | samples/tracepoints/tracepoint-probe-sample2.c | 1 | ||||
| -rw-r--r-- | samples/tracepoints/tracepoint-sample.c | 3 |
4 files changed, 7 insertions, 2 deletions
diff --git a/samples/tracepoints/tp-samples-trace.h b/samples/tracepoints/tp-samples-trace.h index 0216b55bd640..01724e04c556 100644 --- a/samples/tracepoints/tp-samples-trace.h +++ b/samples/tracepoints/tp-samples-trace.h | |||
| @@ -4,10 +4,10 @@ | |||
| 4 | #include <linux/proc_fs.h> /* for struct inode and struct file */ | 4 | #include <linux/proc_fs.h> /* for struct inode and struct file */ |
| 5 | #include <linux/tracepoint.h> | 5 | #include <linux/tracepoint.h> |
| 6 | 6 | ||
| 7 | DEFINE_TRACE(subsys_event, | 7 | DECLARE_TRACE(subsys_event, |
| 8 | TPPROTO(struct inode *inode, struct file *file), | 8 | TPPROTO(struct inode *inode, struct file *file), |
| 9 | TPARGS(inode, file)); | 9 | TPARGS(inode, file)); |
| 10 | DEFINE_TRACE(subsys_eventb, | 10 | DECLARE_TRACE(subsys_eventb, |
| 11 | TPPROTO(void), | 11 | TPPROTO(void), |
| 12 | TPARGS()); | 12 | TPARGS()); |
| 13 | #endif | 13 | #endif |
diff --git a/samples/tracepoints/tracepoint-probe-sample.c b/samples/tracepoints/tracepoint-probe-sample.c index 55abfdda4bd4..e3a964889dc7 100644 --- a/samples/tracepoints/tracepoint-probe-sample.c +++ b/samples/tracepoints/tracepoint-probe-sample.c | |||
| @@ -46,6 +46,7 @@ void __exit tp_sample_trace_exit(void) | |||
| 46 | { | 46 | { |
| 47 | unregister_trace_subsys_eventb(probe_subsys_eventb); | 47 | unregister_trace_subsys_eventb(probe_subsys_eventb); |
| 48 | unregister_trace_subsys_event(probe_subsys_event); | 48 | unregister_trace_subsys_event(probe_subsys_event); |
| 49 | tracepoint_synchronize_unregister(); | ||
| 49 | } | 50 | } |
| 50 | 51 | ||
| 51 | module_exit(tp_sample_trace_exit); | 52 | module_exit(tp_sample_trace_exit); |
diff --git a/samples/tracepoints/tracepoint-probe-sample2.c b/samples/tracepoints/tracepoint-probe-sample2.c index 5e9fcf4afffe..685a5acb4562 100644 --- a/samples/tracepoints/tracepoint-probe-sample2.c +++ b/samples/tracepoints/tracepoint-probe-sample2.c | |||
| @@ -33,6 +33,7 @@ module_init(tp_sample_trace_init); | |||
| 33 | void __exit tp_sample_trace_exit(void) | 33 | void __exit tp_sample_trace_exit(void) |
| 34 | { | 34 | { |
| 35 | unregister_trace_subsys_event(probe_subsys_event); | 35 | unregister_trace_subsys_event(probe_subsys_event); |
| 36 | tracepoint_synchronize_unregister(); | ||
| 36 | } | 37 | } |
| 37 | 38 | ||
| 38 | module_exit(tp_sample_trace_exit); | 39 | module_exit(tp_sample_trace_exit); |
diff --git a/samples/tracepoints/tracepoint-sample.c b/samples/tracepoints/tracepoint-sample.c index 4ae4b7fcc043..00d169792a3e 100644 --- a/samples/tracepoints/tracepoint-sample.c +++ b/samples/tracepoints/tracepoint-sample.c | |||
| @@ -13,6 +13,9 @@ | |||
| 13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
| 14 | #include "tp-samples-trace.h" | 14 | #include "tp-samples-trace.h" |
| 15 | 15 | ||
| 16 | DEFINE_TRACE(subsys_event); | ||
| 17 | DEFINE_TRACE(subsys_eventb); | ||
| 18 | |||
| 16 | struct proc_dir_entry *pentry_example; | 19 | struct proc_dir_entry *pentry_example; |
| 17 | 20 | ||
| 18 | static int my_open(struct inode *inode, struct file *file) | 21 | static int my_open(struct inode *inode, struct file *file) |
