git: a7cfcb264512 - main - init_main: Use TUNABLE_INT_FETCH to initialize verbose_sysinit
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Dec 2024 13:48:23 UTC
The branch main has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=a7cfcb26451219d6f4e60c486c855adeea288397
commit a7cfcb26451219d6f4e60c486c855adeea288397
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-12-06 13:46:55 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-12-06 13:46:55 +0000
init_main: Use TUNABLE_INT_FETCH to initialize verbose_sysinit
It is too late to initialize verbose_sysinit via TUNABLE_INT, as
TUNABLE_INT runs at the order of SI_SUB_TUNABLES, thus any subsystems
those have order prior or equal to SI_SUB_TUNABLES are not logged.
Reviewed by: kevans
Fixes: c7962400c9a7 Add debug.verbose_sysinit tunable for VERBOSE_SYSINIT
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47907
---
sys/kern/init_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index fed5340695cf..d6056d863b77 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -138,7 +138,6 @@ SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0,
* - 1, 'compiled in but verbose by default' (default)
*/
int verbose_sysinit = VERBOSE_SYSINIT;
-TUNABLE_INT("debug.verbose_sysinit", &verbose_sysinit);
#endif
#ifdef INVARIANTS
@@ -270,8 +269,9 @@ mi_startup(void)
/* Construct and sort sysinit list. */
sysinit_mklist(&sysinit_list, SET_BEGIN(sysinit_set), SET_LIMIT(sysinit_set));
- last = SI_SUB_COPYRIGHT;
+ last = SI_SUB_DUMMY;
#if defined(VERBOSE_SYSINIT)
+ TUNABLE_INT_FETCH("debug.verbose_sysinit", &verbose_sysinit);
verbose = 0;
#if !defined(DDB)
printf("VERBOSE_SYSINIT: DDB not enabled, symbol lookups disabled.\n");