Change-Id: I5335d86dc1e4cd3f7fd4270ff1f10cdc70f87e92
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();