src/hotspot/share/prims/jvmtiExport.cpp
changeset 52319 625f6c742392
parent 52179 597ed181a9e8
child 52619 5b4242996d8c
--- a/src/hotspot/share/prims/jvmtiExport.cpp	Mon Oct 29 12:33:41 2018 -0700
+++ b/src/hotspot/share/prims/jvmtiExport.cpp	Wed Oct 17 15:57:10 2018 -0700
@@ -994,6 +994,20 @@
   }
 };
 
+bool JvmtiExport::is_early_phase() {
+  return JvmtiEnvBase::get_phase() <= JVMTI_PHASE_PRIMORDIAL;
+}
+
+bool JvmtiExport::has_early_class_hook_env() {
+  JvmtiEnvIterator it;
+  for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
+    if (env->early_class_hook_env()) {
+      return true;
+    }
+  }
+  return false;
+}
+
 bool JvmtiExport::_should_post_class_file_load_hook = false;
 
 // this entry is for class file load hook on class load, redefine and retransform