[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-commits-all
Subject:    svn commit: r327431 - head/sys/kern
From:       Colin Percival <cperciva () FreeBSD ! org>
Date:       2017-12-31 9:24:11
Message-ID: 201712310924.vBV9OBWA047000 () repo ! freebsd ! org
[Download RAW message or body]

Author: cperciva
Date: Sun Dec 31 09:24:11 2017
New Revision: 327431
URL: https://svnweb.freebsd.org/changeset/base/327431

Log:
  Instrument thread creations for the the benefit of the TSLOG framework.
  This assists in tracking time spent while the boot is being "held" waiting
  for something to happen.

Modified:
  head/sys/kern/kern_kthread.c

Modified: head/sys/kern/kern_kthread.c
==============================================================================
--- head/sys/kern/kern_kthread.c	Sun Dec 31 09:23:52 2017	(r327430)
+++ head/sys/kern/kern_kthread.c	Sun Dec 31 09:24:11 2017	(r327431)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/unistd.h>
 #include <sys/wait.h>
 #include <sys/sched.h>
+#include <sys/tslog.h>
 #include <vm/vm.h>
 #include <vm/vm_extern.h>
 
@@ -124,6 +125,7 @@ kproc_create(void (*func)(void *), void *arg,
 #ifdef KTR
 	sched_clear_tdname(td);
 #endif
+	TSTHREAD(td, td->td_name);
 
 	/* call the processes' main()... */
 	cpu_fork_kthread_handler(td, func, arg);
@@ -282,6 +284,8 @@ kthread_add(void (*func)(void *), void *arg, struct pr
 	va_start(ap, fmt);
 	vsnprintf(newtd->td_name, sizeof(newtd->td_name), fmt, ap);
 	va_end(ap);
+
+	TSTHREAD(newtd, newtd->td_name);
 
 	newtd->td_proc = p;  /* needed for cpu_copy_thread */
 	/* might be further optimized for kthread */
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic