< prev index next >

src/hotspot/share/prims/jvmtiExport.cpp

Print this page

1056       *_end_ptr = *_data_ptr + _curr_len;
1057       _curr_env->Deallocate(_curr_data);
1058     }
1059   }
1060 };
1061 
1062 bool JvmtiExport::is_early_phase() {
1063   return JvmtiEnvBase::get_phase() <= JVMTI_PHASE_PRIMORDIAL;
1064 }
1065 
1066 bool JvmtiExport::has_early_class_hook_env() {
1067   JvmtiEnvIterator it;
1068   for (JvmtiEnv* env = it.first(); env != nullptr; env = it.next(env)) {
1069     if (env->early_class_hook_env()) {
1070       return true;
1071     }
1072   }
1073   return false;
1074 }
1075 










1076 bool JvmtiExport::_should_post_class_file_load_hook = false;
1077 
1078 // This flag is read by C2 during VM internal objects allocation
1079 int JvmtiExport::_should_notify_object_alloc = 0;
1080 
1081 // this entry is for class file load hook on class load, redefine and retransform
1082 bool JvmtiExport::post_class_file_load_hook(Symbol* h_name,
1083                                             Handle class_loader,
1084                                             Handle h_protection_domain,
1085                                             unsigned char **data_ptr,
1086                                             unsigned char **end_ptr,
1087                                             JvmtiCachedClassFileData **cache_ptr) {
1088   if (JvmtiEnv::get_phase() < JVMTI_PHASE_PRIMORDIAL) {
1089     return false;
1090   }
1091   if (JavaThread::current()->is_in_tmp_VTMS_transition()) {
1092     return false; // skip CFLH events in tmp VTMS transition
1093   }
1094 
1095   JvmtiClassFileLoadHookPoster poster(h_name, class_loader,

1056       *_end_ptr = *_data_ptr + _curr_len;
1057       _curr_env->Deallocate(_curr_data);
1058     }
1059   }
1060 };
1061 
1062 bool JvmtiExport::is_early_phase() {
1063   return JvmtiEnvBase::get_phase() <= JVMTI_PHASE_PRIMORDIAL;
1064 }
1065 
1066 bool JvmtiExport::has_early_class_hook_env() {
1067   JvmtiEnvIterator it;
1068   for (JvmtiEnv* env = it.first(); env != nullptr; env = it.next(env)) {
1069     if (env->early_class_hook_env()) {
1070       return true;
1071     }
1072   }
1073   return false;
1074 }
1075 
1076 bool JvmtiExport::has_early_vmstart_env() {
1077   JvmtiEnvIterator it;
1078   for (JvmtiEnv* env = it.first(); env != nullptr; env = it.next(env)) {
1079     if (env->early_vmstart_env()) {
1080       return true;
1081     }
1082   }
1083   return false;
1084 }
1085 
1086 bool JvmtiExport::_should_post_class_file_load_hook = false;
1087 
1088 // This flag is read by C2 during VM internal objects allocation
1089 int JvmtiExport::_should_notify_object_alloc = 0;
1090 
1091 // this entry is for class file load hook on class load, redefine and retransform
1092 bool JvmtiExport::post_class_file_load_hook(Symbol* h_name,
1093                                             Handle class_loader,
1094                                             Handle h_protection_domain,
1095                                             unsigned char **data_ptr,
1096                                             unsigned char **end_ptr,
1097                                             JvmtiCachedClassFileData **cache_ptr) {
1098   if (JvmtiEnv::get_phase() < JVMTI_PHASE_PRIMORDIAL) {
1099     return false;
1100   }
1101   if (JavaThread::current()->is_in_tmp_VTMS_transition()) {
1102     return false; // skip CFLH events in tmp VTMS transition
1103   }
1104 
1105   JvmtiClassFileLoadHookPoster poster(h_name, class_loader,
< prev index next >