145 bool is_valid(); 146 147 bool use_version_1_0_semantics(); // agent asked for version 1.0 148 bool use_version_1_1_semantics(); // agent asked for version 1.1 149 bool use_version_1_2_semantics(); // agent asked for version 1.2 150 151 bool is_retransformable() { return _is_retransformable; } 152 153 static ByteSize jvmti_external_offset() { 154 return byte_offset_of(JvmtiEnvBase, _jvmti_external); 155 }; 156 157 static JvmtiEnv* JvmtiEnv_from_jvmti_env(jvmtiEnv *env) { 158 return (JvmtiEnv*)((intptr_t)env - in_bytes(jvmti_external_offset())); 159 }; 160 161 jvmtiCapabilities *get_capabilities() { return &_current_capabilities; } 162 163 jvmtiCapabilities *get_prohibited_capabilities() { return &_prohibited_capabilities; } 164 165 bool early_vmstart_env() { 166 return get_capabilities()->can_generate_early_vmstart != 0; 167 } 168 169 static char** get_all_native_method_prefixes(int* count_ptr); 170 171 // This test will answer true when all environments have been disposed and some have 172 // not yet been deallocated. As a result, this test should only be used as an 173 // optimization for the no environment case. 174 static bool environments_might_exist() { 175 return head_environment() != NULL; 176 } 177 178 static void check_for_periodic_clean_up(); 179 180 JvmtiEnvEventEnable *env_event_enable() { 181 return &_env_event_enable; 182 } 183 184 jvmtiError allocate(jlong size, unsigned char** mem_ptr) { | 145 bool is_valid(); 146 147 bool use_version_1_0_semantics(); // agent asked for version 1.0 148 bool use_version_1_1_semantics(); // agent asked for version 1.1 149 bool use_version_1_2_semantics(); // agent asked for version 1.2 150 151 bool is_retransformable() { return _is_retransformable; } 152 153 static ByteSize jvmti_external_offset() { 154 return byte_offset_of(JvmtiEnvBase, _jvmti_external); 155 }; 156 157 static JvmtiEnv* JvmtiEnv_from_jvmti_env(jvmtiEnv *env) { 158 return (JvmtiEnv*)((intptr_t)env - in_bytes(jvmti_external_offset())); 159 }; 160 161 jvmtiCapabilities *get_capabilities() { return &_current_capabilities; } 162 163 jvmtiCapabilities *get_prohibited_capabilities() { return &_prohibited_capabilities; } 164 165 bool early_class_hook_env() { 166 return get_capabilities()->can_generate_early_class_hook_events != 0; 167 } 168 169 bool early_vmstart_env() { 170 return get_capabilities()->can_generate_early_vmstart != 0; 171 } 172 173 static char** get_all_native_method_prefixes(int* count_ptr); 174 175 // This test will answer true when all environments have been disposed and some have 176 // not yet been deallocated. As a result, this test should only be used as an 177 // optimization for the no environment case. 178 static bool environments_might_exist() { 179 return head_environment() != NULL; 180 } 181 182 static void check_for_periodic_clean_up(); 183 184 JvmtiEnvEventEnable *env_event_enable() { 185 return &_env_event_enable; 186 } 187 188 jvmtiError allocate(jlong size, unsigned char** mem_ptr) { |