am 33dab964: Improve "No new threads in -Xzygote mode" message to include thread name.
* commit '33dab964ac38c05472b734a2d36f6a2aacf9b731':
Improve "No new threads in -Xzygote mode" message to include thread name.
diff --git a/vm/Thread.c b/vm/Thread.c
index ccfbc9b..c2e11c8 100644
--- a/vm/Thread.c
+++ b/vm/Thread.c
@@ -1416,13 +1416,15 @@
gDvm.offJavaLangThread_name);
char* threadName = dvmCreateCstrFromString(nameStr);
bool profilerThread = strcmp(threadName, "SamplingProfiler") == 0;
- free(threadName);
if (!profilerThread) {
- dvmThrowException("Ljava/lang/IllegalStateException;",
- "No new threads in -Xzygote mode");
+ dvmThrowExceptionFmt("Ljava/lang/IllegalStateException;",
+ "No new threads in -Xzygote mode. "
+ "Found thread named '%s'", threadName);
+ free(threadName);
goto fail;
}
+ free(threadName);
}
self = dvmThreadSelf();