Initialize SDT probes during SI_SUB_DTRACE_PROVIDER.
This is consistent with all other DTrace providers and ensures that SDT probes are available for boot-time tracing. MFC after: 2 weeks
This commit is contained in:
parent
33baaeb76f
commit
9cabb44981
@ -384,28 +384,20 @@ sdt_unload()
|
||||
static int
|
||||
sdt_modevent(module_t mod __unused, int type, void *data __unused)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
switch (type) {
|
||||
case MOD_LOAD:
|
||||
sdt_load();
|
||||
break;
|
||||
|
||||
case MOD_UNLOAD:
|
||||
error = sdt_unload();
|
||||
break;
|
||||
|
||||
case MOD_SHUTDOWN:
|
||||
break;
|
||||
|
||||
return (0);
|
||||
default:
|
||||
error = EOPNOTSUPP;
|
||||
break;
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
SYSINIT(sdt_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, sdt_load, NULL);
|
||||
SYSUNINIT(sdt_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, sdt_unload, NULL);
|
||||
|
||||
DEV_MODULE(sdt, sdt_modevent, NULL);
|
||||
MODULE_VERSION(sdt, 1);
|
||||
MODULE_DEPEND(sdt, dtrace, 1, 1, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user