Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 2016 17:05:00 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r293560 - stable/10/sys/compat/linux
Message-ID:  <201601091705.u09H50fO051369@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sat Jan  9 17:05:00 2016
New Revision: 293560
URL: https://svnweb.freebsd.org/changeset/base/293560

Log:
  MFC r283456:
  
  Improve ktr(9) records in thread managment code.

Modified:
  stable/10/sys/compat/linux/linux_emul.c
  stable/10/sys/compat/linux/linux_fork.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_emul.c
==============================================================================
--- stable/10/sys/compat/linux/linux_emul.c	Sat Jan  9 17:03:53 2016	(r293559)
+++ stable/10/sys/compat/linux/linux_emul.c	Sat Jan  9 17:05:00 2016	(r293560)
@@ -147,6 +147,9 @@ linux_proc_exit(void *arg __unused, stru
 	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, st
 		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);
 }

Modified: stable/10/sys/compat/linux/linux_fork.c
==============================================================================
--- stable/10/sys/compat/linux/linux_fork.c	Sat Jan  9 17:03:53 2016	(r293559)
+++ stable/10/sys/compat/linux/linux_fork.c	Sat Jan  9 17:05:00 2016	(r293560)
@@ -275,7 +275,7 @@ linux_clone_thread(struct thread *td, st
 	}
 #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);
 
@@ -352,7 +352,7 @@ linux_clone_thread(struct thread *td, st
 		(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) {
@@ -435,7 +435,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);
 
@@ -443,7 +443,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601091705.u09H50fO051369>