diff options
author | Ingo Molnar | 2013-02-03 11:14:06 +0100 |
---|---|---|
committer | Ingo Molnar | 2013-02-03 11:14:06 +0100 |
commit | f7355a5e7c722452e2cd80d6b83acb2f4423c4a2 (patch) | |
tree | 2ee172a5607de2baf25b8e9b99acd181a34676a6 /samples/tracepoints/tracepoint-probe-sample.c | |
parent | Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
parent | tracing: Init current_trace to nop_trace and remove NULL checks (diff) | |
download | kernel-qcow2-linux-f7355a5e7c722452e2cd80d6b83acb2f4423c4a2.tar.gz kernel-qcow2-linux-f7355a5e7c722452e2cd80d6b83acb2f4423c4a2.tar.xz kernel-qcow2-linux-f7355a5e7c722452e2cd80d6b83acb2f4423c4a2.zip |
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/core
Pull tracing updated from Steve Rostedt.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'samples/tracepoints/tracepoint-probe-sample.c')
-rw-r--r-- | samples/tracepoints/tracepoint-probe-sample.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/samples/tracepoints/tracepoint-probe-sample.c b/samples/tracepoints/tracepoint-probe-sample.c deleted file mode 100644 index 744c0b9652a7..000000000000 --- a/samples/tracepoints/tracepoint-probe-sample.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * tracepoint-probe-sample.c - * - * sample tracepoint probes. - */ - -#include <linux/module.h> -#include <linux/file.h> -#include <linux/dcache.h> -#include "tp-samples-trace.h" - -/* - * 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(void *ignore, - struct inode *inode, struct file *file) -{ - path_get(&file->f_path); - dget(file->f_path.dentry); - printk(KERN_INFO "Event is encountered with filename %s\n", - file->f_path.dentry->d_name.name); - dput(file->f_path.dentry); - path_put(&file->f_path); -} - -static void probe_subsys_eventb(void *ignore) -{ - printk(KERN_INFO "Event B is encountered\n"); -} - -static int __init tp_sample_trace_init(void) -{ - int ret; - - ret = register_trace_subsys_event(probe_subsys_event, NULL); - WARN_ON(ret); - ret = register_trace_subsys_eventb(probe_subsys_eventb, NULL); - WARN_ON(ret); - - return 0; -} - -module_init(tp_sample_trace_init); - -static void __exit tp_sample_trace_exit(void) -{ - unregister_trace_subsys_eventb(probe_subsys_eventb, NULL); - unregister_trace_subsys_event(probe_subsys_event, NULL); - tracepoint_synchronize_unregister(); -} - -module_exit(tp_sample_trace_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Tracepoint Probes Samples"); |