summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_4bsd.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2007-11-14 06:21:24 +0000
committerjulian <julian@FreeBSD.org>2007-11-14 06:21:24 +0000
commitb2732e0c22b45ce7f1225a9c12834ec8c6bf9dda (patch)
tree55718e91180bcb3bddcd007fc62792945ab8ae97 /sys/kern/sched_4bsd.c
parentb248158d8d9ce6732f5835ff5c90efc7eae9d38a (diff)
downloadFreeBSD-src-b2732e0c22b45ce7f1225a9c12834ec8c6bf9dda.zip
FreeBSD-src-b2732e0c22b45ce7f1225a9c12834ec8c6bf9dda.tar.gz
generally we are interested in what thread did something as
opposed to what process. Since threads by default have teh name of the process unless over-written with more useful information, just print the thread name instead.
Diffstat (limited to 'sys/kern/sched_4bsd.c')
-rw-r--r--sys/kern/sched_4bsd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index a5e1449..8a42143 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -615,7 +615,7 @@ sched_exit(struct proc *p, struct thread *td)
{
CTR3(KTR_SCHED, "sched_exit: %p(%s) prio %d",
- td, td->td_proc->p_comm, td->td_priority);
+ td, td->td_name, td->td_priority);
PROC_SLOCK_ASSERT(p, MA_OWNED);
sched_exit_thread(FIRST_THREAD_IN_PROC(p), td);
}
@@ -625,7 +625,7 @@ sched_exit_thread(struct thread *td, struct thread *child)
{
CTR3(KTR_SCHED, "sched_exit_thread: %p(%s) prio %d",
- child, child->td_proc->p_comm, child->td_priority);
+ child, child->td_name, child->td_priority);
thread_lock(td);
td->td_estcpu = ESTCPULIM(td->td_estcpu + child->td_estcpu);
thread_unlock(td);
@@ -679,8 +679,8 @@ static void
sched_priority(struct thread *td, u_char prio)
{
CTR6(KTR_SCHED, "sched_prio: %p(%s) prio %d newprio %d by %p(%s)",
- td, td->td_proc->p_comm, td->td_priority, prio, curthread,
- curthread->td_proc->p_comm);
+ td, td->td_name, td->td_priority, prio, curthread,
+ curthread->td_name);
THREAD_LOCK_ASSERT(td, MA_OWNED);
if (td->td_priority == prio)
@@ -1071,8 +1071,8 @@ sched_add(struct thread *td, int flags)
KASSERT(td->td_flags & TDF_INMEM,
("sched_add: thread swapped out"));
CTR5(KTR_SCHED, "sched_add: %p(%s) prio %d by %p(%s)",
- td, td->td_proc->p_comm, td->td_priority, curthread,
- curthread->td_proc->p_comm);
+ td, td->td_name, td->td_priority, curthread,
+ curthread->td_name);
/*
* Now that the thread is moving to the run-queue, set the lock
* to the scheduler's lock.
@@ -1140,8 +1140,8 @@ sched_add(struct thread *td, int flags)
KASSERT(td->td_flags & TDF_INMEM,
("sched_add: thread swapped out"));
CTR5(KTR_SCHED, "sched_add: %p(%s) prio %d by %p(%s)",
- td, td->td_proc->p_comm, td->td_priority, curthread,
- curthread->td_proc->p_comm);
+ td, td->td_name, td->td_priority, curthread,
+ curthread->td_name);
/*
* Now that the thread is moving to the run-queue, set the lock
* to the scheduler's lock.
@@ -1188,8 +1188,8 @@ sched_rem(struct thread *td)
("sched_rem: thread not on run queue"));
mtx_assert(&sched_lock, MA_OWNED);
CTR5(KTR_SCHED, "sched_rem: %p(%s) prio %d by %p(%s)",
- td, td->td_proc->p_comm, td->td_priority, curthread,
- curthread->td_proc->p_comm);
+ td, td->td_name, td->td_priority, curthread,
+ curthread->td_name);
if ((td->td_proc->p_flag & P_NOLOAD) == 0)
sched_load_rem();
OpenPOWER on IntegriCloud