test mark update
[lttv.git] / tests / kernel / test-mark.c
index 72874fa4827c5a760004c0609697737ee3ae220d..080e5a5f85ab2e4c9a80b0e7a335321d3a98e376 100644 (file)
@@ -6,11 +6,17 @@
 #include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/sched.h>
+#include <asm/ptrace.h>
 
 volatile int x=7;
 
 struct proc_dir_entry *pentry = NULL;
 
+static inline void test(struct pt_regs * regs)
+{
+       MARK(kernel_debug_test, "%d %ld %p", 2, regs->eip, regs);
+}
+
 static int my_open(struct inode *inode, struct file *file)
 {
        unsigned int i;
@@ -22,6 +28,8 @@ static int my_open(struct inode *inode, struct file *file)
        }
        MARK(subsys_mark2, "%d %s", 2, "blah2");
        MARK(subsys_mark3, "%d %s %s", x, "blah3", "blah5");
+       test(NULL);
+       test(NULL);
 
        return -EPERM;
 }
@@ -33,9 +41,14 @@ static struct file_operations my_operations = {
 
 int init_module(void)
 {
+       unsigned int i;
+
        pentry = create_proc_entry("testmark", 0444, NULL);
        if (pentry)
                pentry->proc_fops = &my_operations;
+
+       marker_list_probe(NULL);
+
        return 0;
 }
 
This page took 0.024143 seconds and 4 git commands to generate.