Repair broken __KTRACE_OPT tracing in line with S^4 fixes - Bug 3822 RCL_3 PDK_3.0.4
authorWilliam Roberts <williamr@symbian.org>
Thu, 28 Oct 2010 15:56:26 +0100
branchRCL_3
changeset 298 2024e52ac966
parent 295 5460f47b94ad
Repair broken __KTRACE_OPT tracing in line with S^4 fixes - Bug 3822
kernel/eka/kernel/sexec.cpp
--- a/kernel/eka/kernel/sexec.cpp	Mon Oct 25 15:50:44 2010 +0100
+++ b/kernel/eka/kernel/sexec.cpp	Thu Oct 28 15:56:26 2010 +0100
@@ -938,9 +938,9 @@
 
 TInt ExecHandler::OpenObject(TObjectType aObjType, const TDesC8& aName, TOwnerType aType)
 	{
-	__KTRACE_OPT(KTHREAD,Kern::Printf("Exec::OpenObject %lS",&aName));
 	TFullName n;
 	Kern::KUDesGet(n,aName);
+	__KTRACE_OPT(KTHREAD,Kern::Printf("Exec::OpenObject %lS",&n));
 	if (Kern::ValidateFullName(n)!=KErrNone)
 		K::PanicKernExec(EBadName);
 	if ((TUint)aObjType>=(TUint)ENumObjectTypes)
@@ -1012,12 +1012,12 @@
 		{
 		Kern::KUDesGet(n,*aName);
 		pN=&n;
+		__KTRACE_OPT(KSEMAPHORE,Kern::Printf("Exec::MutexCreate %lS",pN));
 		}
 	else if (aType==EOwnerThread)
 		pO=TheCurrentThread;
 	else
 		pO=TheCurrentThread->iOwningProcess;
-	__KTRACE_OPT(KSEMAPHORE,Kern::Printf("Exec::MutexCreate %lS",aName));
 	NKern::ThreadEnterCS();
 	DMutex* pM;
 	TInt r=K::MutexCreate(pM, *pN, pO, ETrue, KMutexOrdUser);
@@ -1036,7 +1036,6 @@
 
 TInt ExecHandler::SemaphoreCreate(const TDesC8* aName, TInt aCount, TOwnerType aType)
 	{
-	__KTRACE_OPT(KSEMAPHORE,Kern::Printf("Exec::SemaphoreCreate %lS",aName));
 	TKName n;
 	DObject* pO=NULL;
 	const TDesC* pN=NULL;
@@ -1044,6 +1043,7 @@
 		{
 		Kern::KUDesGet(n,*aName);
 		pN=&n;
+		__KTRACE_OPT(KSEMAPHORE,Kern::Printf("Exec::SemaphoreCreate %lS",pN));
 		}
 	else if (aType==EOwnerThread)
 		pO=TheCurrentThread;