update split script
[lttv.git] / tests / kernel / test-mark.c
index a2ce7e12a1e81f4ceeac1a814abb9353bba171a1..8f998b9b3d900ffcc7cac063b0fbec2a96bab570 100644 (file)
@@ -6,16 +6,29 @@
 #include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/sched.h>
+#include <asm/ptrace.h>
 
-int x=7;
+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)
 {
-       MARK(subsys_mark1, "%d", 1);
-       MARK(subsys_mark2, "%d %s", 2, "blah2");
-       MARK(subsys_mark3, "%d %s", x, "blah3");
+       unsigned int i;
+
+       for(i=0; i<2; i++) {
+               MARK(subsys_mark1, "%d", 1);
+       }
+       MARK(subsys_mark2, "%d %s %s", 2, "blah2", "blahx");
+       MARK(subsys_mark3, "%d %s %s", x, "blah3", "blah5");
+       MARK(subsys_mark3, "%d %s %s", x, "blah3", "blah5");
+       test(NULL);
+       test(NULL);
 
        return -EPERM;
 }
@@ -30,6 +43,9 @@ int init_module(void)
        pentry = create_proc_entry("testmark", 0444, NULL);
        if (pentry)
                pentry->proc_fops = &my_operations;
+
+       marker_list_probe(NULL);
+
        return 0;
 }
 
This page took 0.023452 seconds and 4 git commands to generate.