Be able to run jvmti-stress on RI

This is useful for testing.

When running on RI no class redefinition is performed.

Test: ./test/run-test --dev --jvm --jvmti-stress 001-HelloWorld
Test: ./test/run-test --dev --jvm --jvmti-stress 902
Test: ./test/run-test --dev --jvm --jvmti-stress 986

Change-Id: If234ff553bf136312c5128d03b02b28f4ff94e3d
diff --git a/test/ti-stress/stress.cc b/test/ti-stress/stress.cc
index e7d76dd..e8e3cc7 100644
--- a/test/ti-stress/stress.cc
+++ b/test/ti-stress/stress.cc
@@ -95,8 +95,8 @@
   if (thread == nullptr) {
     info.name = const_cast<char*>("<NULLPTR>");
   } else if (jvmtienv->GetThreadInfo(thread, &info) != JVMTI_ERROR_NONE) {
-    LOG(ERROR) << "Unable to get thread info!";
-    return;
+    LOG(WARNING) << "Unable to get thread info!";
+    info.name = const_cast<char*>("<UNKNOWN THREAD>");
   }
   char *fname, *fsig, *fgen;
   char *cname, *cgen;
@@ -185,7 +185,10 @@
   LOG(INFO) << "manual load & initialization of class java/lang/VMClassLoader!";
   jclass klass = jni_env->FindClass("java/lang/VMClassLoader");
   if (klass == nullptr) {
-    LOG(ERROR) << "Unable to find VMClassLoader class!";
+    // Probably on RI. Clear the exception so we can continue but don't mark vmclassloader as
+    // initialized.
+    LOG(WARNING) << "Unable to find VMClassLoader class!";
+    jni_env->ExceptionClear();
   } else {
     // GetMethodID is spec'd to cause the class to be initialized.
     jni_env->GetMethodID(klass, "hashCode", "()I");