Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalCompilerToVM.cpp @ 14093:dd783f0ecf17
refactor CompilerToVM interface
author | twisti |
---|---|
date | Thu, 06 Mar 2014 15:18:47 -0800 |
parents | 2f37b0e442fe |
children | a38a54030ea2 |
comparison
equal
deleted
inserted
replaced
14092:13072c084e6f | 14093:dd783f0ecf17 |
---|---|
235 } | 235 } |
236 | 236 |
237 return (jlong) (address) resolved_klass; | 237 return (jlong) (address) resolved_klass; |
238 C2V_END | 238 C2V_END |
239 | 239 |
240 C2V_VMENTRY(jlong, lookupKlassByName, (JNIEnv *env, jobject, jstring name, jclass loading_class)) | |
241 KlassHandle loading_klass = java_lang_Class::as_Klass(JNIHandles::resolve(loading_class)); | |
242 Symbol* name_symbol = java_lang_String::as_symbol(JNIHandles::resolve(name), THREAD); | |
243 KlassHandle klass = GraalEnv::get_klass_by_name(loading_klass, name_symbol, false); | |
244 return (jlong) (address) klass(); | |
245 C2V_END | |
246 | |
240 C2V_VMENTRY(jobject, lookupConstantInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index)) | 247 C2V_VMENTRY(jobject, lookupConstantInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index)) |
241 ConstantPool* cp = (ConstantPool*) metaspace_constant_pool; | 248 ConstantPool* cp = (ConstantPool*) metaspace_constant_pool; |
242 oop result = NULL; | 249 oop result = NULL; |
243 constantTag tag = cp->tag_at(index); | 250 constantTag tag = cp->tag_at(index); |
244 switch (tag.value()) { | 251 switch (tag.value()) { |
255 fatal(err_msg_res("unknown constant pool tag %s at cpi %d in %s", tag.internal_name(), index, cp->pool_holder()->name()->as_C_string())); | 262 fatal(err_msg_res("unknown constant pool tag %s at cpi %d in %s", tag.internal_name(), index, cp->pool_holder()->name()->as_C_string())); |
256 } | 263 } |
257 return JNIHandles::make_local(THREAD, result); | 264 return JNIHandles::make_local(THREAD, result); |
258 C2V_END | 265 C2V_END |
259 | 266 |
267 C2V_VMENTRY(jint, lookupNameAndTypeRefIndexInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index)) | |
268 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; | |
269 return cp->name_and_type_ref_index_at(index); | |
270 C2V_END | |
271 | |
272 C2V_VMENTRY(jlong, lookupNameRefInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index)) | |
273 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; | |
274 return (jlong) (address) cp->name_ref_at(index); | |
275 C2V_END | |
276 | |
277 C2V_VMENTRY(jlong, lookupSignatureRefInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index)) | |
278 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; | |
279 return (jlong) (address) cp->signature_ref_at(index); | |
280 C2V_END | |
281 | |
282 C2V_VMENTRY(jint, lookupKlassRefIndexInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index)) | |
283 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; | |
284 return cp->klass_ref_index_at(index); | |
285 C2V_END | |
286 | |
287 C2V_VMENTRY(jlong, lookupKlassInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index, jbyte opcode)) | |
288 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; | |
289 KlassHandle loading_klass(cp->pool_holder()); | |
290 bool is_accessible = false; | |
291 KlassHandle klass = GraalEnv::get_klass_by_index(cp, index, is_accessible, loading_klass); | |
292 if (klass.is_null()) { | |
293 // We have to lock the cpool to keep the oop from being resolved | |
294 // while we are accessing it. | |
295 MonitorLockerEx ml(cp->lock()); | |
296 constantTag tag = cp->tag_at(index); | |
297 if (tag.is_klass()) { | |
298 // The klass has been inserted into the constant pool | |
299 // very recently. | |
300 return (jlong) CompilerToVM::tag_pointer(cp->resolved_klass_at(index)); | |
301 } else if (tag.is_symbol()) { | |
302 return (jlong) CompilerToVM::tag_pointer(cp->symbol_at(index)); | |
303 } else { | |
304 assert(cp->tag_at(index).is_unresolved_klass(), "wrong tag"); | |
305 return (jlong) CompilerToVM::tag_pointer(cp->unresolved_klass_at(index)); | |
306 } | |
307 } | |
308 return (jlong) CompilerToVM::tag_pointer(klass()); | |
309 C2V_END | |
310 | |
260 C2V_VMENTRY(jobject, lookupAppendixInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index)) | 311 C2V_VMENTRY(jobject, lookupAppendixInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index)) |
261 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; | 312 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; |
262 oop appendix_oop = ConstantPool::appendix_at_if_loaded(cp, index); | 313 oop appendix_oop = ConstantPool::appendix_at_if_loaded(cp, index); |
263 return JNIHandles::make_local(THREAD, appendix_oop); | 314 return JNIHandles::make_local(THREAD, appendix_oop); |
264 C2V_END | 315 C2V_END |
265 | 316 |
266 C2V_VMENTRY(jlong, lookupMethodInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index, jbyte opcode, jlongArray unresolvedInfo_handle)) | 317 C2V_VMENTRY(jlong, lookupMethodInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index, jbyte opcode)) |
267 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; | 318 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; |
268 instanceKlassHandle pool_holder(cp->pool_holder()); | 319 instanceKlassHandle pool_holder(cp->pool_holder()); |
269 | |
270 Bytecodes::Code bc = (Bytecodes::Code) (((int) opcode) & 0xFF); | 320 Bytecodes::Code bc = (Bytecodes::Code) (((int) opcode) & 0xFF); |
271 | |
272 methodHandle method = GraalEnv::get_method_by_index(cp, index, bc, pool_holder); | 321 methodHandle method = GraalEnv::get_method_by_index(cp, index, bc, pool_holder); |
273 if (!method.is_null()) { | 322 return (jlong) (address) method(); |
274 return (jlong) method(); | |
275 } else { | |
276 // Get the unresolved method's name and signature. | |
277 typeArrayOop unresolvedInfo = (typeArrayOop) JNIHandles::resolve(unresolvedInfo_handle); | |
278 assert(unresolvedInfo != NULL && unresolvedInfo->length() == 4, "must be"); | |
279 unresolvedInfo->long_at_put(0, (jlong) cp->name_ref_at(index)); | |
280 unresolvedInfo->long_at_put(1, (jlong) cp->signature_ref_at(index)); | |
281 Handle type; | |
282 if (bc != Bytecodes::_invokedynamic) { | |
283 int holder_index = cp->klass_ref_index_at(index); | |
284 Symbol* klass_name = NULL; | |
285 KlassHandle klass = GraalCompiler::get_Klass(cp, holder_index, cp->pool_holder(), klass_name); | |
286 unresolvedInfo->long_at_put(2, (jlong) klass_name); | |
287 unresolvedInfo->long_at_put(3, (jlong) klass()); | |
288 } else { | |
289 unresolvedInfo->long_at_put(3, (jlong) SystemDictionary::MethodHandle_klass()); | |
290 } | |
291 return 0L; | |
292 } | |
293 C2V_END | |
294 | |
295 C2V_VMENTRY(jlong, lookupTypeInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index, jlongArray unresolvedTypeName_handle)) | |
296 ConstantPool* cp = (ConstantPool*) metaspace_constant_pool; | |
297 Symbol* klass_name = NULL; | |
298 KlassHandle klass = GraalCompiler::get_Klass(cp, index, cp->pool_holder(), klass_name); | |
299 typeArrayOop unresolvedTypeName = (typeArrayOop) JNIHandles::resolve(unresolvedTypeName_handle); | |
300 unresolvedTypeName->long_at_put(0, (jlong) klass_name); | |
301 return (jlong) klass(); | |
302 C2V_END | 323 C2V_END |
303 | 324 |
304 C2V_VMENTRY(void, loadReferencedTypeInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index, jbyte op)) | 325 C2V_VMENTRY(void, loadReferencedTypeInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index, jbyte op)) |
305 ConstantPool* cp = (ConstantPool*) metaspace_constant_pool; | 326 ConstantPool* cp = (ConstantPool*) metaspace_constant_pool; |
306 Bytecodes::Code bc = (Bytecodes::Code) (((int) op) & 0xFF); | 327 Bytecodes::Code bc = (Bytecodes::Code) (((int) op) & 0xFF); |
321 InstanceKlass::cast(klass)->initialize(CHECK); | 342 InstanceKlass::cast(klass)->initialize(CHECK); |
322 } | 343 } |
323 } | 344 } |
324 C2V_END | 345 C2V_END |
325 | 346 |
326 C2V_VMENTRY(jboolean, lookupFieldInPool, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index, jbyte opcode, jlongArray info_handle)) | 347 C2V_VMENTRY(jlong, resolveField, (JNIEnv *env, jobject, jlong metaspace_constant_pool, jint index, jbyte opcode, jlongArray info_handle)) |
327 ResourceMark rm; | 348 ResourceMark rm; |
328 | |
329 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; | 349 constantPoolHandle cp = (ConstantPool*) metaspace_constant_pool; |
330 | 350 Bytecodes::Code code = (Bytecodes::Code)(((int) opcode) & 0xFF); |
331 int nt_index = cp->name_and_type_ref_index_at(index); | 351 fieldDescriptor result; |
332 int type_index = cp->signature_ref_index_at(nt_index); | 352 LinkResolver::resolve_field_access(result, cp, index, Bytecodes::java_code(code), true, false, CHECK_0); |
333 Symbol* type_name = cp->symbol_at(type_index); | |
334 int name_index = cp->name_ref_index_at(nt_index); | |
335 Symbol* name = cp->symbol_at(name_index); | |
336 int holder_index = cp->klass_ref_index_at(index); | |
337 Symbol* holder_name = NULL; | |
338 KlassHandle holder = GraalCompiler::get_Klass(cp, holder_index, cp->pool_holder(), holder_name); | |
339 KlassHandle type = GraalCompiler::get_KlassFromSignature(type_name, cp->pool_holder()); | |
340 typeArrayOop info = (typeArrayOop) JNIHandles::resolve(info_handle); | 353 typeArrayOop info = (typeArrayOop) JNIHandles::resolve(info_handle); |
341 assert(info != NULL && info->length() == 7, "must be"); | 354 assert(info != NULL && info->length() == 2, "must be"); |
342 info->long_at_put(0, (jlong) name); | 355 info->long_at_put(0, (jlong) result.access_flags().as_int()); |
343 info->long_at_put(1, (jlong) type_name); | 356 info->long_at_put(1, (jlong) result.offset()); |
344 info->long_at_put(2, (jlong) type()); | 357 return (jlong) (address) result.field_holder(); |
345 info->long_at_put(3, (jlong) holder_name); | |
346 info->long_at_put(4, (jlong) holder()); | |
347 | |
348 Bytecodes::Code code = (Bytecodes::Code)(((int) opcode) & 0xFF); | |
349 if (!holder.is_null()) { | |
350 int offset = -1; | |
351 fieldDescriptor result; | |
352 LinkResolver::resolve_field_access(result, cp, index, Bytecodes::java_code(code), true, false, Thread::current()); | |
353 | |
354 if (HAS_PENDING_EXCEPTION) { | |
355 CLEAR_PENDING_EXCEPTION; | |
356 } else { | |
357 info->long_at_put(4, (jlong) result.field_holder()); | |
358 info->long_at_put(5, (jlong) result.access_flags().as_int()); | |
359 info->long_at_put(6, (jlong) result.offset()); | |
360 return true; | |
361 } | |
362 } | |
363 return false; | |
364 C2V_END | 358 C2V_END |
365 | 359 |
366 C2V_VMENTRY(jlong, resolveMethod, (JNIEnv *, jobject, jobject resolved_type, jstring name, jstring signature)) | 360 C2V_VMENTRY(jlong, resolveMethod, (JNIEnv *, jobject, jobject resolved_type, jstring name, jstring signature)) |
367 assert(JNIHandles::resolve(resolved_type) != NULL, ""); | 361 assert(JNIHandles::resolve(resolved_type) != NULL, ""); |
368 Klass* klass = java_lang_Class::as_Klass(HotSpotResolvedObjectType::javaClass(resolved_type)); | 362 Klass* klass = java_lang_Class::as_Klass(HotSpotResolvedObjectType::javaClass(resolved_type)); |
369 Symbol* name_symbol = java_lang_String::as_symbol(JNIHandles::resolve(name), THREAD); | 363 Symbol* name_symbol = java_lang_String::as_symbol(JNIHandles::resolve(name), THREAD); |
370 Symbol* signature_symbol = java_lang_String::as_symbol(JNIHandles::resolve(signature), THREAD); | 364 Symbol* signature_symbol = java_lang_String::as_symbol(JNIHandles::resolve(signature), THREAD); |
371 Method* method = klass->lookup_method(name_symbol, signature_symbol); | 365 return (jlong) (address) klass->lookup_method(name_symbol, signature_symbol); |
372 if (method == NULL) { | |
373 if (TraceGraal >= 3) { | |
374 ResourceMark rm; | |
375 tty->print_cr("Could not resolve method %s %s on klass %s", name_symbol->as_C_string(), signature_symbol->as_C_string(), klass->name()->as_C_string()); | |
376 } | |
377 return 0; | |
378 } | |
379 return (jlong) (address) method; | |
380 C2V_END | 366 C2V_END |
381 | 367 |
382 C2V_VMENTRY(jboolean, hasFinalizableSubclass,(JNIEnv *, jobject, jobject hotspot_klass)) | 368 C2V_VMENTRY(jboolean, hasFinalizableSubclass,(JNIEnv *, jobject, jobject hotspot_klass)) |
383 Klass* klass = java_lang_Class::as_Klass(HotSpotResolvedObjectType::javaClass(hotspot_klass)); | 369 Klass* klass = java_lang_Class::as_Klass(HotSpotResolvedObjectType::javaClass(hotspot_klass)); |
384 assert(klass != NULL, "method must not be called for primitive types"); | 370 assert(klass != NULL, "method must not be called for primitive types"); |
857 #define HS_INSTALLED_CODE "Lcom/oracle/graal/hotspot/meta/HotSpotInstalledCode;" | 843 #define HS_INSTALLED_CODE "Lcom/oracle/graal/hotspot/meta/HotSpotInstalledCode;" |
858 #define METASPACE_KLASS "J" | 844 #define METASPACE_KLASS "J" |
859 #define METASPACE_METHOD "J" | 845 #define METASPACE_METHOD "J" |
860 #define METASPACE_METHOD_DATA "J" | 846 #define METASPACE_METHOD_DATA "J" |
861 #define METASPACE_CONSTANT_POOL "J" | 847 #define METASPACE_CONSTANT_POOL "J" |
848 #define METASPACE_SYMBOL "J" | |
862 | 849 |
863 JNINativeMethod CompilerToVM_methods[] = { | 850 JNINativeMethod CompilerToVM_methods[] = { |
864 {CC"initializeBytecode", CC"("METASPACE_METHOD"[B)[B", FN_PTR(initializeBytecode)}, | 851 {CC"initializeBytecode", CC"("METASPACE_METHOD"[B)[B", FN_PTR(initializeBytecode)}, |
865 {CC"exceptionTableStart", CC"("METASPACE_METHOD")J", FN_PTR(exceptionTableStart)}, | 852 {CC"exceptionTableStart", CC"("METASPACE_METHOD")J", FN_PTR(exceptionTableStart)}, |
866 {CC"hasBalancedMonitors", CC"("METASPACE_METHOD")Z", FN_PTR(hasBalancedMonitors)}, | 853 {CC"hasBalancedMonitors", CC"("METASPACE_METHOD")Z", FN_PTR(hasBalancedMonitors)}, |
867 {CC"findUniqueConcreteMethod", CC"("METASPACE_METHOD")"METASPACE_METHOD, FN_PTR(findUniqueConcreteMethod)}, | 854 {CC"findUniqueConcreteMethod", CC"("METASPACE_METHOD")"METASPACE_METHOD, FN_PTR(findUniqueConcreteMethod)}, |
868 {CC"getKlassImplementor", CC"("METASPACE_KLASS")"METASPACE_KLASS, FN_PTR(getKlassImplementor)}, | 855 {CC"getKlassImplementor", CC"("METASPACE_KLASS")"METASPACE_KLASS, FN_PTR(getKlassImplementor)}, |
869 {CC"getStackTraceElement", CC"("METASPACE_METHOD"I)"STACK_TRACE_ELEMENT, FN_PTR(getStackTraceElement)}, | 856 {CC"getStackTraceElement", CC"("METASPACE_METHOD"I)"STACK_TRACE_ELEMENT, FN_PTR(getStackTraceElement)}, |
870 {CC"initializeMethod", CC"("METASPACE_METHOD HS_RESOLVED_METHOD")V", FN_PTR(initializeMethod)}, | 857 {CC"initializeMethod", CC"("METASPACE_METHOD HS_RESOLVED_METHOD")V", FN_PTR(initializeMethod)}, |
871 {CC"doNotInlineOrCompile", CC"("METASPACE_METHOD")V", FN_PTR(doNotInlineOrCompile)}, | 858 {CC"doNotInlineOrCompile", CC"("METASPACE_METHOD")V", FN_PTR(doNotInlineOrCompile)}, |
872 {CC"canInlineMethod", CC"("METASPACE_METHOD")Z", FN_PTR(canInlineMethod)}, | 859 {CC"canInlineMethod", CC"("METASPACE_METHOD")Z", FN_PTR(canInlineMethod)}, |
873 {CC"shouldInlineMethod", CC"("METASPACE_METHOD")Z", FN_PTR(shouldInlineMethod)}, | 860 {CC"shouldInlineMethod", CC"("METASPACE_METHOD")Z", FN_PTR(shouldInlineMethod)}, |
874 {CC"getCompiledCodeSize", CC"("METASPACE_METHOD")I", FN_PTR(getCompiledCodeSize)}, | 861 {CC"getCompiledCodeSize", CC"("METASPACE_METHOD")I", FN_PTR(getCompiledCodeSize)}, |
875 {CC"lookupType", CC"("STRING CLASS"Z)"METASPACE_KLASS, FN_PTR(lookupType)}, | 862 {CC"lookupType", CC"("STRING CLASS"Z)"METASPACE_KLASS, FN_PTR(lookupType)}, |
876 {CC"lookupConstantInPool", CC"("METASPACE_CONSTANT_POOL"I)"OBJECT, FN_PTR(lookupConstantInPool)}, | 863 {CC"lookupKlassByName", CC"("STRING CLASS")"METASPACE_KLASS, FN_PTR(lookupKlassByName)}, |
877 {CC"lookupAppendixInPool", CC"("METASPACE_CONSTANT_POOL"I)"OBJECT, FN_PTR(lookupAppendixInPool)}, | 864 {CC"lookupConstantInPool", CC"("METASPACE_CONSTANT_POOL"I)"OBJECT, FN_PTR(lookupConstantInPool)}, |
878 {CC"lookupMethodInPool", CC"("METASPACE_CONSTANT_POOL"IB[J)"METASPACE_METHOD, FN_PTR(lookupMethodInPool)}, | 865 {CC"lookupNameRefInPool", CC"("METASPACE_CONSTANT_POOL"I)"METASPACE_SYMBOL, FN_PTR(lookupNameRefInPool)}, |
879 {CC"lookupTypeInPool", CC"("METASPACE_CONSTANT_POOL"I[J)"METASPACE_KLASS, FN_PTR(lookupTypeInPool)}, | 866 {CC"lookupNameAndTypeRefIndexInPool", CC"("METASPACE_CONSTANT_POOL"I)I", FN_PTR(lookupNameAndTypeRefIndexInPool)}, |
880 {CC"loadReferencedTypeInPool", CC"("METASPACE_CONSTANT_POOL"IB)V", FN_PTR(loadReferencedTypeInPool)}, | 867 {CC"lookupSignatureRefInPool", CC"("METASPACE_CONSTANT_POOL"I)"METASPACE_SYMBOL, FN_PTR(lookupSignatureRefInPool)}, |
881 {CC"lookupFieldInPool", CC"("METASPACE_CONSTANT_POOL"IB[J)Z", FN_PTR(lookupFieldInPool)}, | 868 {CC"lookupKlassRefIndexInPool", CC"("METASPACE_CONSTANT_POOL"I)I", FN_PTR(lookupKlassRefIndexInPool)}, |
882 {CC"resolveMethod", CC"("HS_RESOLVED_TYPE STRING STRING")"METASPACE_METHOD, FN_PTR(resolveMethod)}, | 869 {CC"lookupKlassInPool", CC"("METASPACE_CONSTANT_POOL"I)"METASPACE_KLASS, FN_PTR(lookupKlassInPool)}, |
883 {CC"getClassInitializer", CC"("HS_RESOLVED_TYPE")"METASPACE_METHOD, FN_PTR(getClassInitializer)}, | 870 {CC"lookupAppendixInPool", CC"("METASPACE_CONSTANT_POOL"I)"OBJECT, FN_PTR(lookupAppendixInPool)}, |
884 {CC"hasFinalizableSubclass", CC"("HS_RESOLVED_TYPE")Z", FN_PTR(hasFinalizableSubclass)}, | 871 {CC"lookupMethodInPool", CC"("METASPACE_CONSTANT_POOL"IB)"METASPACE_METHOD, FN_PTR(lookupMethodInPool)}, |
885 {CC"getMaxCallTargetOffset", CC"(J)J", FN_PTR(getMaxCallTargetOffset)}, | 872 {CC"loadReferencedTypeInPool", CC"("METASPACE_CONSTANT_POOL"IB)V", FN_PTR(loadReferencedTypeInPool)}, |
886 {CC"getMetaspaceMethod", CC"("CLASS"I)"METASPACE_METHOD, FN_PTR(getMetaspaceMethod)}, | 873 {CC"resolveField", CC"("METASPACE_CONSTANT_POOL"IB[J)"METASPACE_KLASS, FN_PTR(resolveField)}, |
887 {CC"initializeConfiguration", CC"("HS_CONFIG")V", FN_PTR(initializeConfiguration)}, | 874 {CC"resolveMethod", CC"("HS_RESOLVED_TYPE STRING STRING")"METASPACE_METHOD, FN_PTR(resolveMethod)}, |
888 {CC"installCode0", CC"("HS_COMPILED_CODE HS_INSTALLED_CODE SPECULATION_LOG")I", FN_PTR(installCode0)}, | 875 {CC"getClassInitializer", CC"("HS_RESOLVED_TYPE")"METASPACE_METHOD, FN_PTR(getClassInitializer)}, |
889 {CC"notifyCompilationStatistics", CC"(I"HS_RESOLVED_METHOD"ZIJJ"HS_INSTALLED_CODE")V", FN_PTR(notifyCompilationStatistics)}, | 876 {CC"hasFinalizableSubclass", CC"("HS_RESOLVED_TYPE")Z", FN_PTR(hasFinalizableSubclass)}, |
890 {CC"printCompilationStatistics", CC"(ZZ)V", FN_PTR(printCompilationStatistics)}, | 877 {CC"getMaxCallTargetOffset", CC"(J)J", FN_PTR(getMaxCallTargetOffset)}, |
891 {CC"resetCompilationStatistics", CC"()V", FN_PTR(resetCompilationStatistics)}, | 878 {CC"getMetaspaceMethod", CC"("CLASS"I)"METASPACE_METHOD, FN_PTR(getMetaspaceMethod)}, |
892 {CC"disassembleCodeBlob", CC"(J)"STRING, FN_PTR(disassembleCodeBlob)}, | 879 {CC"initializeConfiguration", CC"("HS_CONFIG")V", FN_PTR(initializeConfiguration)}, |
893 {CC"executeCompiledMethodVarargs", CC"(["OBJECT HS_INSTALLED_CODE")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, | 880 {CC"installCode0", CC"("HS_COMPILED_CODE HS_INSTALLED_CODE SPECULATION_LOG")I", FN_PTR(installCode0)}, |
894 {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)}, | 881 {CC"notifyCompilationStatistics", CC"(I"HS_RESOLVED_METHOD"ZIJJ"HS_INSTALLED_CODE")V", FN_PTR(notifyCompilationStatistics)}, |
895 {CC"getLineNumberTable", CC"("HS_RESOLVED_METHOD")[J", FN_PTR(getLineNumberTable)}, | 882 {CC"printCompilationStatistics", CC"(ZZ)V", FN_PTR(printCompilationStatistics)}, |
896 {CC"getLocalVariableTableStart", CC"("HS_RESOLVED_METHOD")J", FN_PTR(getLocalVariableTableStart)}, | 883 {CC"resetCompilationStatistics", CC"()V", FN_PTR(resetCompilationStatistics)}, |
897 {CC"getLocalVariableTableLength", CC"("HS_RESOLVED_METHOD")I", FN_PTR(getLocalVariableTableLength)}, | 884 {CC"disassembleCodeBlob", CC"(J)"STRING, FN_PTR(disassembleCodeBlob)}, |
898 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, | 885 {CC"executeCompiledMethodVarargs", CC"(["OBJECT HS_INSTALLED_CODE")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, |
899 {CC"invalidateInstalledCode", CC"("HS_INSTALLED_CODE")V", FN_PTR(invalidateInstalledCode)}, | 886 {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)}, |
900 {CC"readUnsafeUncompressedPointer", CC"("OBJECT"J)"OBJECT, FN_PTR(readUnsafeUncompressedPointer)}, | 887 {CC"getLineNumberTable", CC"("HS_RESOLVED_METHOD")[J", FN_PTR(getLineNumberTable)}, |
901 {CC"readUnsafeKlassPointer", CC"("OBJECT")J", FN_PTR(readUnsafeKlassPointer)}, | 888 {CC"getLocalVariableTableStart", CC"("HS_RESOLVED_METHOD")J", FN_PTR(getLocalVariableTableStart)}, |
902 {CC"collectCounters", CC"()[J", FN_PTR(collectCounters)}, | 889 {CC"getLocalVariableTableLength", CC"("HS_RESOLVED_METHOD")I", FN_PTR(getLocalVariableTableLength)}, |
903 {CC"getGPUs", CC"()"STRING, FN_PTR(getGPUs)}, | 890 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, |
904 {CC"allocateCompileId", CC"("HS_RESOLVED_METHOD"I)I", FN_PTR(allocateCompileId)}, | 891 {CC"invalidateInstalledCode", CC"("HS_INSTALLED_CODE")V", FN_PTR(invalidateInstalledCode)}, |
905 {CC"isMature", CC"("METASPACE_METHOD_DATA")Z", FN_PTR(isMature)}, | 892 {CC"readUnsafeUncompressedPointer", CC"("OBJECT"J)"OBJECT, FN_PTR(readUnsafeUncompressedPointer)}, |
893 {CC"readUnsafeKlassPointer", CC"("OBJECT")J", FN_PTR(readUnsafeKlassPointer)}, | |
894 {CC"collectCounters", CC"()[J", FN_PTR(collectCounters)}, | |
895 {CC"getGPUs", CC"()"STRING, FN_PTR(getGPUs)}, | |
896 {CC"allocateCompileId", CC"("HS_RESOLVED_METHOD"I)I", FN_PTR(allocateCompileId)}, | |
897 {CC"isMature", CC"("METASPACE_METHOD_DATA")Z", FN_PTR(isMature)}, | |
906 }; | 898 }; |
907 | 899 |
908 int CompilerToVM_methods_count() { | 900 int CompilerToVM_methods_count() { |
909 return sizeof(CompilerToVM_methods) / sizeof(JNINativeMethod); | 901 return sizeof(CompilerToVM_methods) / sizeof(JNINativeMethod); |
910 } | 902 } |