1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

Improve ktr(9) records in thread managment code.

Differential Revision:	https://reviews.freebsd.org/D1464
Reviewed by:	trasz
This commit is contained in:
Dmitry Chagin 2015-05-24 17:09:07 +00:00
parent 68cf0367e9
commit 7d96520b25
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283456
2 changed files with 10 additions and 7 deletions

View File

@ -147,6 +147,9 @@ linux_proc_exit(void *arg __unused, struct proc *p)
if (__predict_false(SV_CURPROC_ABI() != SV_ABI_LINUX))
return;
LINUX_CTR3(proc_exit, "thread(%d) proc(%d) p %p",
td->td_tid, p->p_pid, p);
pem = pem_find(p);
if (pem == NULL)
return;
@ -249,7 +252,7 @@ linux_thread_dtor(void *arg __unused, struct thread *td)
return;
td->td_emuldata = NULL;
LINUX_CTR1(exit, "thread dtor(%d)", em->em_tid);
LINUX_CTR1(thread_dtor, "thread(%d)", em->em_tid);
free(em, M_TEMP);
}
@ -271,8 +274,8 @@ linux_schedtail(struct thread *td)
if (child_set_tid != NULL) {
error = copyout(&em->em_tid, child_set_tid,
sizeof(em->em_tid));
LINUX_CTR4(clone, "schedtail(%d) %p stored %d error %d",
LINUX_CTR4(schedtail, "thread(%d) %p stored %d error %d",
td->td_tid, child_set_tid, em->em_tid, error);
} else
LINUX_CTR1(clone, "schedtail(%d)", em->em_tid);
LINUX_CTR1(schedtail, "thread(%d)", em->em_tid);
}

View File

@ -274,7 +274,7 @@ linux_clone_thread(struct thread *td, struct linux_clone_args *args)
}
#endif
LINUX_CTR4(clone, "thread(%d) flags %x ptid %p ctid %p",
LINUX_CTR4(clone_thread, "thread(%d) flags %x ptid %p ctid %p",
td->td_tid, (unsigned)args->flags,
args->parent_tidptr, args->child_tidptr);
@ -351,7 +351,7 @@ linux_clone_thread(struct thread *td, struct linux_clone_args *args)
(int)newtd->td_tid, args->stack);
#endif
LINUX_CTR2(clone, "thread(%d) successful clone to %d",
LINUX_CTR2(clone_thread, "thread(%d) successful clone to %d",
td->td_tid, newtd->td_tid);
if (args->flags & LINUX_CLONE_PARENT_SETTID) {
@ -434,7 +434,7 @@ linux_thread_detach(struct thread *td)
em = em_find(td);
KASSERT(em != NULL, ("thread_detach: emuldata not found.\n"));
LINUX_CTR1(exit, "thread detach(%d)", em->em_tid);
LINUX_CTR1(thread_detach, "thread(%d)", em->em_tid);
release_futexes(td, em);
@ -442,7 +442,7 @@ linux_thread_detach(struct thread *td)
if (child_clear_tid != NULL) {
LINUX_CTR2(exit, "thread detach(%d) %p",
LINUX_CTR2(thread_detach, "thread(%d) %p",
em->em_tid, child_clear_tid);
error = suword32(child_clear_tid, 0);