Avoid calling thread->getName() in release builds.

Profile shows this will save a couple percentage points.
This commit is contained in:
Unknown W. Brackets committed 2013-01-07 18:09:26 -08:00
1 parent 138b3a0823
commit 0eb13142aa
1 file changed
+4 -1
+4 -1
View File
@@ -2172,7 +2172,10 @@ void __KernelSwitchContext(Thread *target, const char *reason)
__KernelSaveContext(&cur->context);
oldPC = currentMIPS->pc;
oldUID = cur->GetUID();
oldName = cur->GetName();
// Profile on Windows shows this takes time, skip it.
if (DEBUG_LEVEL <= MAX_LOGLEVEL)
oldName = cur->GetName();
}
currentThread = target->GetUID();
__KernelLoadContext(&target->context);