Author: cperciva Date: Sun Dec 31 09:22:31 2017 New Revision: 327426 URL: https://svnweb.freebsd.org/changeset/base/327426
Log: Use the TSLOG framework to record entry/exit timestamps for machine independent functions with important roles in the early boot process: mi_startup (with the "exit" recorded when it becomes swapper), start_init (with the "exit" recorded when the thread is about to "return" into the newly created init process), vfs_mountroot, and vfs_mountroot_wait. Modified: head/sys/kern/init_main.c head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sun Dec 31 09:22:07 2017 (r327425) +++ head/sys/kern/init_main.c Sun Dec 31 09:22:31 2017 (r327426) @@ -220,6 +220,8 @@ mi_startup(void) int verbose; #endif + TSENTER(); + if (boothowto & RB_VERBOSE) bootverbose++; @@ -313,6 +315,8 @@ restart: } } + TSEXIT(); /* Here so we don't overlap with start_init. */ + mtx_assert(&Giant, MA_OWNED | MA_NOTRECURSED); mtx_unlock(&Giant); @@ -706,6 +710,8 @@ start_init(void *dummy) GIANT_REQUIRED; + TSENTER(); /* Here so we don't overlap with mi_startup. */ + td = curthread; p = td->td_proc; @@ -799,6 +805,7 @@ start_init(void *dummy) */ if ((error = sys_execve(td, &args)) == EJUSTRETURN) { mtx_unlock(&Giant); + TSEXIT(); return; } if (error != ENOENT) Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sun Dec 31 09:22:07 2017 (r327425) +++ head/sys/kern/vfs_mountroot.c Sun Dec 31 09:22:31 2017 (r327426) @@ -938,6 +938,8 @@ vfs_mountroot_wait(void) struct timeval lastfail; int curfail; + TSENTER(); + curfail = 0; while (1) { DROP_GIANT(); @@ -957,6 +959,8 @@ vfs_mountroot_wait(void) msleep(&root_holds, &root_holds_mtx, PZERO | PDROP, "roothold", hz); } + + TSEXIT(); } static int @@ -1013,6 +1017,8 @@ vfs_mountroot(void) struct thread *td; time_t timebase; int error; + + TSENTER(); td = curthread; @@ -1062,6 +1068,8 @@ vfs_mountroot(void) mtx_unlock(&root_holds_mtx); EVENTHANDLER_INVOKE(mountroot); + + TSEXIT(); } static struct mntarg * _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"