]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/kernel/process_32.c
sh: Trivial trace_mark() instrumentation for core events.
[linux-2.6-omap-h63xx.git] / arch / sh / kernel / process_32.c
index 914e543102df1f9908dcf5653981929e0acba513..7b013aa8c43f0f343b6b3daf98404664ccb1842f 100644 (file)
@@ -169,6 +169,7 @@ __asm__(".align 5\n"
 int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
 {
        struct pt_regs regs;
+       int pid;
 
        memset(&regs, 0, sizeof(regs));
        regs.regs[4] = (unsigned long)arg;
@@ -178,8 +179,12 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
        regs.sr = (1 << 30);
 
        /* Ok, create the new process.. */
-       return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
-                      &regs, 0, NULL, NULL);
+       pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
+                     &regs, 0, NULL, NULL);
+
+       trace_mark(kernel_arch_kthread_create, "pid %d fn %p", pid, fn);
+
+       return pid;
 }
 
 /*