]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: add dtrace_module_loaded() and dtrace_module_unloaded()
authorRandy Dunlap <randy.dunlap@oracle.com>
Fri, 15 Jul 2011 16:37:44 +0000 (09:37 -0700)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:39:54 +0000 (22:39 +0100)
Give the static probes in the kernel image a module name of
  "kernel_builtins" and a module state of LIVE.

Fix an extra-paren typo in dtrace_dev.c.

NOTE:  This is incomplete.  There are a few TBDs and FIXMEs
  in this patch.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
kernel/dtrace/sdt_register.c

index f3ffcbe67bdafa0fdba429c0345a7b80867356dd..2602a436c0eac99c98b451556d502a23b7f4e032 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/module.h>
 #include <linux/sdt.h>
 #include <linux/slab.h>
+#include <linux/string.h>
 #include <asm-generic/bitsperlong.h>
 #include <asm-generic/sections.h>
 
@@ -100,6 +101,8 @@ void dtrace_register_builtins(void)
                        __func__);
                return;
        }
+       kernmod->state = MODULE_STATE_LIVE;
+       strlcpy(kernmod->name, "kernel_builtins", MODULE_NAME_LEN);
 
        DPRINTK("%lu SDT relocation entries beg. @0x%p\n",
                dtrace_relocs_count, &dtrace_relocs);