aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/dev/dtrace/dtrace_load.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cddl/dev/dtrace/dtrace_load.c')
-rw-r--r--sys/cddl/dev/dtrace/dtrace_load.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/cddl/dev/dtrace/dtrace_load.c b/sys/cddl/dev/dtrace/dtrace_load.c
index 9c5681a6e822..a153e7eefca8 100644
--- a/sys/cddl/dev/dtrace/dtrace_load.c
+++ b/sys/cddl/dev/dtrace/dtrace_load.c
@@ -56,6 +56,12 @@ dtrace_load(void *dummy)
/* Hang our hook for exceptions. */
dtrace_invop_init();
+ /* Register callbacks for module load and unload events. */
+ dtrace_modload_tag = EVENTHANDLER_REGISTER(mod_load,
+ dtrace_mod_load, NULL, EVENTHANDLER_PRI_ANY);
+ dtrace_modunload_tag = EVENTHANDLER_REGISTER(mod_unload,
+ dtrace_mod_unload, NULL, EVENTHANDLER_PRI_ANY);
+
/*
* Initialise the mutexes without 'witness' because the dtrace
* code is mostly written to wait for memory. To have the