svn commit: r315839 - stable/10/sys/kern
Andriy Gapon
avg at FreeBSD.org
Thu Mar 23 08:08:40 UTC 2017
Author: avg
Date: Thu Mar 23 08:08:39 2017
New Revision: 315839
URL: https://svnweb.freebsd.org/changeset/base/315839
Log:
MFC r315075: trace thread running state when a thread is run for the first time
Modified:
stable/10/sys/kern/sched_4bsd.c
stable/10/sys/kern/sched_ule.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/kern/sched_4bsd.c
==============================================================================
--- stable/10/sys/kern/sched_4bsd.c Thu Mar 23 08:08:34 2017 (r315838)
+++ stable/10/sys/kern/sched_4bsd.c Thu Mar 23 08:08:39 2017 (r315839)
@@ -1659,6 +1659,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: stable/10/sys/kern/sched_ule.c
==============================================================================
--- stable/10/sys/kern/sched_ule.c Thu Mar 23 08:08:34 2017 (r315838)
+++ stable/10/sys/kern/sched_ule.c Thu Mar 23 08:08:39 2017 (r315839)
@@ -2728,6 +2728,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);
}
/*
More information about the svn-src-stable-10
mailing list