]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Force dtrace_ctf.ko to be loaded whenever dtrace.ko is.
authorNick Alcock <nick.alcock@oracle.com>
Fri, 20 Jul 2012 22:00:07 +0000 (23:00 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 20 Jul 2012 22:00:07 +0000 (23:00 +0100)
DTrace userspace makes the simplifying assumption that dtrace_ctf.ko (containing
the CTF for the kernel, for built-in modules, and for shared types, but no code)
is always loaded whenever DTrace is usable.  (The CTF itself is in a non-loaded
section, but having dtrace_ctf.ko in the list of loaded modules means that we
can eliminate an annoying set of dtrace_ctf-related special case.)

We do this by introducing a dummy function dtrace_ctf_forceload() into the
dtrace_ctf module, which DTrace then calls: depmod will then arrange for
dtrace_ctf to be loaded when we need it.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
dtrace/dtrace.h
dtrace/dtrace_dev.c

index ff054d294da721fd4129bbab7f9e8bc2859352ea..e6cbb332fdcc83c334e6309a1226f2975df525dd 100644 (file)
@@ -2135,6 +2135,8 @@ extern int dtrace_badattr(const dtrace_attribute_t *);
 extern int dtrace_badname(const char *);
 extern void dtrace_cred2priv(const cred_t *, uint32_t *, uid_t *);
 
+extern void dtrace_ctf_forceload(void);
+
 #define DT_PROVIDER_POPS(name)                                         \
   static unsigned int  name##_refc = 0;                                \
                                                                        \
index 3f68182db370ce2c1320ed06ad82a0cf07d11a92..35abbc81556a4a61601278ead005358dd95d97a2 100644 (file)
@@ -1214,6 +1214,7 @@ int dtrace_dev_init(void)
        }
 
        dtrace_os_init();
+       dtrace_ctf_forceload();
 
        dtrace_modload = dtrace_module_loaded;
        dtrace_modunload = dtrace_module_unloaded;