Date: Wed, 27 Jun 2018 21:13:20 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335743 - stable/11/sys/kern Message-ID: <201806272113.w5RLDKZG006214@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Wed Jun 27 21:13:20 2018 New Revision: 335743 URL: https://svnweb.freebsd.org/changeset/base/335743 Log: MFC r335458: Add debug.verbose_sysinit tunable for VERBOSE_SYSINIT VERBOSE_SYSINIT is currently an all-or-nothing option. debug.verbose_sysinit adds an option to have the code compiled in but quiet by default so that getting this information from a device in the field doesn't necessarily require distributing a recompiled kernel. Its default is VERBOSE_SYSINIT's value as defined in the kernconf. As such, the default behavior for simply omitting or including this option is unchanged. Modified: stable/11/sys/kern/init_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/init_main.c ============================================================================== --- stable/11/sys/kern/init_main.c Wed Jun 27 21:11:28 2018 (r335742) +++ stable/11/sys/kern/init_main.c Wed Jun 27 21:13:20 2018 (r335743) @@ -117,6 +117,18 @@ int bootverbose = BOOTVERBOSE; SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, "Control the output of verbose kernel messages"); +#ifdef VERBOSE_SYSINIT +/* + * We'll use the defined value of VERBOSE_SYSINIT from the kernel config to + * dictate the default VERBOSE_SYSINIT behavior. Significant values for this + * option and associated tunable are: + * - 0, 'compiled in but silent by default' + * - 1, 'compiled in but verbose by default' (default) + */ +int verbose_sysinit = VERBOSE_SYSINIT; +TUNABLE_INT("debug.verbose_sysinit", &verbose_sysinit); +#endif + #ifdef INVARIANTS FEATURE(invariants, "Kernel compiled with INVARIANTS, may affect performance"); #endif @@ -264,7 +276,7 @@ restart: continue; #if defined(VERBOSE_SYSINIT) - if ((*sipp)->subsystem > last) { + if ((*sipp)->subsystem > last && verbose_sysinit != 0) { verbose = 1; last = (*sipp)->subsystem; printf("subsystem %x\n", last);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806272113.w5RLDKZG006214>