Date: Tue, 3 May 2016 19:42:58 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r299001 - stable/10/sys/cddl/dev/sdt Message-ID: <201605031942.u43Jgw5n061710@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Tue May 3 19:42:58 2016 New Revision: 299001 URL: https://svnweb.freebsd.org/changeset/base/299001 Log: MFC r297771: Initialize SDT probes during SI_SUB_DTRACE_PROVIDER. Modified: stable/10/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/10/sys/cddl/dev/sdt/sdt.c Tue May 3 19:37:25 2016 (r299000) +++ stable/10/sys/cddl/dev/sdt/sdt.c Tue May 3 19:42:58 2016 (r299001) @@ -381,28 +381,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605031942.u43Jgw5n061710>