Author: avg Date: Sat Mar 11 15:57:36 2017 New Revision: 315075 URL: https://svnweb.freebsd.org/changeset/base/315075
Log: trace thread running state when a thread is run for the first time This applies to both KTR_SCHED and DTrace sched:::on-cpu tracing. MFC after: 10 days Modified: head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sat Mar 11 15:47:27 2017 (r315074) +++ head/sys/kern/sched_4bsd.c Sat Mar 11 15:57:36 2017 (r315075) @@ -1666,6 +1666,10 @@ sched_fork_exit(struct thread *td) lock_profile_obtain_lock_success(&sched_lock.lock_object, 0, 0, __FILE__, __LINE__); THREAD_LOCK_ASSERT(td, MA_OWNED | MA_NOTRECURSED); + + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(td), "running", + "prio:%d", td->td_priority); + SDT_PROBE0(sched, , , on__cpu); } char * Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sat Mar 11 15:47:27 2017 (r315074) +++ head/sys/kern/sched_ule.c Sat Mar 11 15:57:36 2017 (r315075) @@ -2756,6 +2756,10 @@ sched_fork_exit(struct thread *td) TDQ_LOCK_ASSERT(tdq, MA_OWNED | MA_NOTRECURSED); lock_profile_obtain_lock_success( &TDQ_LOCKPTR(tdq)->lock_object, 0, 0, __FILE__, __LINE__); + + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(td), "running", + "prio:%d", td->td_priority); + SDT_PROBE0(sched, , , on__cpu); } /* _______________________________________________ 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"