< prev index next >

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp

Print this page




 436       }
 437     }
 438     klass = *((Klass**) (intptr_t) (base_address + offset));
 439   } else {
 440     JVMCI_THROW_MSG_NULL(IllegalArgumentException,
 441                 err_msg("Unexpected arguments: %s " JLONG_FORMAT " %s",
 442                         base_object.is_non_null() ? JVMCIENV->klass_name(base_object) : "null",
 443                         offset, compressed ? "true" : "false"));
 444   }
 445   assert (klass == NULL || klass->is_klass(), "invalid read");
 446   JVMCIObject result = JVMCIENV->get_jvmci_type(klass, JVMCI_CHECK_NULL);
 447   return JVMCIENV->get_jobject(result);
 448 }
 449 
 450 C2V_VMENTRY_NULL(jobject, findUniqueConcreteMethod, (JNIEnv* env, jobject, jobject jvmci_type, jobject jvmci_method))
 451   methodHandle method = JVMCIENV->asMethod(jvmci_method);
 452   Klass* holder = JVMCIENV->asKlass(jvmci_type);
 453   if (holder->is_interface()) {
 454     JVMCI_THROW_MSG_NULL(InternalError, err_msg("Interface %s should be handled in Java code", holder->external_name()));
 455   }
 456   if (method->can_be_statically_bound()) {
 457     JVMCI_THROW_MSG_NULL(InternalError, err_msg("Effectively static method %s.%s should be handled in Java code", method->method_holder()->external_name(), method->external_name()));
 458   }
 459 
 460   methodHandle ucm;
 461   {
 462     MutexLocker locker(Compile_lock);
 463     ucm = Dependencies::find_unique_concrete_method(holder, method());
 464   }
 465   JVMCIObject result = JVMCIENV->get_jvmci_method(ucm, JVMCI_CHECK_NULL);
 466   return JVMCIENV->get_jobject(result);
 467 C2V_END
 468 
 469 C2V_VMENTRY_NULL(jobject, getImplementor, (JNIEnv* env, jobject, jobject jvmci_type))
 470   Klass* klass = JVMCIENV->asKlass(jvmci_type);
 471   if (!klass->is_interface()) {
 472     THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(),
 473         err_msg("Expected interface type, got %s", klass->external_name()));
 474   }
 475   InstanceKlass* iklass = InstanceKlass::cast(klass);
 476   JVMCIKlassHandle handle(THREAD);
 477   {
 478     // Need Compile_lock around implementor()


 907 
 908   int nr_meta_refs = recorder->nr_meta_refs();
 909   JVMCIObjectArray metadataArray = JVMCIENV->new_Object_array(nr_meta_refs, JVMCI_CHECK_(JVMCI::cache_full));
 910   for (int i = 0; i < nr_meta_refs; ++i) {
 911     jobject element = recorder->meta_element(i);
 912     if (element == NULL) {
 913       return JVMCI::cache_full;
 914     }
 915     JVMCIENV->put_object_at(metadataArray, i, JVMCIENV->wrap(element));
 916   }
 917   HotSpotJVMCI::HotSpotMetaData::set_metadata(JVMCIENV, metadata_handle, metadataArray);
 918 
 919   ExceptionHandlerTable* handler = code_metadata.get_exception_table();
 920   int table_size = handler->size_in_bytes();
 921   JVMCIPrimitiveArray exceptionArray = JVMCIENV->new_byteArray(table_size, JVMCI_CHECK_(JVMCI::cache_full));
 922   if (table_size > 0) {
 923     handler->copy_bytes_to((address) HotSpotJVMCI::resolve(exceptionArray)->byte_at_addr(0));
 924   }
 925   HotSpotJVMCI::HotSpotMetaData::set_exceptionBytes(JVMCIENV, metadata_handle, exceptionArray);
 926 
 927   ImplicitExceptionTable* implicit = code_metadata.get_implicit_exception_table();
 928   int implicit_table_size = implicit->size_in_bytes();
 929   JVMCIPrimitiveArray implicitExceptionArray = JVMCIENV->new_byteArray(implicit_table_size, JVMCI_CHECK_(JVMCI::cache_full));
 930   if (implicit_table_size > 0) {
 931     implicit->copy_bytes_to((address) HotSpotJVMCI::resolve(implicitExceptionArray)->byte_at_addr(0), implicit_table_size);
 932   }
 933   HotSpotJVMCI::HotSpotMetaData::set_implicitExceptionBytes(JVMCIENV, metadata_handle, implicitExceptionArray);
 934 
 935   return result;
 936 #else
 937   JVMCI_THROW_MSG_0(InternalError, "unimplemented");
 938 #endif
 939 C2V_END
 940 
 941 C2V_VMENTRY(void, resetCompilationStatistics, (JNIEnv* env, jobject))
 942   JVMCICompiler* compiler = JVMCICompiler::instance(true, CHECK);
 943   CompilerStatistics* stats = compiler->stats();
 944   stats->_standard.reset();
 945   stats->_osr.reset();
 946 C2V_END
 947 
 948 C2V_VMENTRY_NULL(jobject, disassembleCodeBlob, (JNIEnv* env, jobject, jobject installedCode))
 949   HandleMark hm;
 950 
 951   if (installedCode == NULL) {
 952     JVMCI_THROW_MSG_NULL(NullPointerException, "installedCode is null");
 953   }
 954 


1107   JVMCIObject nmethod_mirror = JVMCIENV->wrap(hs_nmethod);
1108   JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, JVMCI_CHECK);
1109 C2V_END
1110 
1111 C2V_VMENTRY_NULL(jobject, readUncompressedOop, (JNIEnv* env, jobject, jlong addr))
1112   oop ret = RawAccess<>::oop_load((oop*)(address)addr);
1113   return JVMCIENV->get_jobject(JVMCIENV->get_object_constant(ret));
1114  C2V_END
1115 
1116 C2V_VMENTRY_NULL(jlongArray, collectCounters, (JNIEnv* env, jobject))
1117   // Returns a zero length array if counters aren't enabled
1118   JVMCIPrimitiveArray array = JVMCIENV->new_longArray(JVMCICounterSize, JVMCI_CHECK_NULL);
1119   if (JVMCICounterSize > 0) {
1120     jlong* temp_array = NEW_RESOURCE_ARRAY(jlong, JVMCICounterSize);
1121     JavaThread::collect_counters(temp_array, JVMCICounterSize);
1122     JVMCIENV->copy_longs_from(temp_array, array, 0, JVMCICounterSize);
1123   }
1124   return (jlongArray) JVMCIENV->get_jobject(array);
1125 C2V_END
1126 
1127 C2V_VMENTRY_0(jint, getCountersSize, (JNIEnv* env, jobject))
1128   return (jint) JVMCICounterSize;
1129 C2V_END
1130 
1131 C2V_VMENTRY_0(jboolean, setCountersSize, (JNIEnv* env, jobject, jint new_size))
1132   return JavaThread::resize_all_jvmci_counters(new_size);
1133 C2V_END
1134 
1135 C2V_VMENTRY_0(jint, allocateCompileId, (JNIEnv* env, jobject, jobject jvmci_method, int entry_bci))
1136   HandleMark hm;
1137   if (jvmci_method == NULL) {
1138     JVMCI_THROW_0(NullPointerException);
1139   }
1140   Method* method = JVMCIENV->asMethod(jvmci_method);
1141   if (entry_bci >= method->code_size() || entry_bci < -1) {
1142     JVMCI_THROW_MSG_0(IllegalArgumentException, err_msg("Unexpected bci %d", entry_bci));
1143   }
1144   return CompileBroker::assign_compile_id_unlocked(THREAD, method, entry_bci);
1145 C2V_END
1146 
1147 
1148 C2V_VMENTRY_0(jboolean, isMature, (JNIEnv* env, jobject, jlong metaspace_method_data))
1149   MethodData* mdo = JVMCIENV->asMethodData(metaspace_method_data);
1150   return mdo != NULL && mdo->is_mature();
1151 C2V_END
1152 
1153 C2V_VMENTRY_0(jboolean, hasCompiledCodeForOSR, (JNIEnv* env, jobject, jobject jvmci_method, int entry_bci, int comp_level))
1154   Method* method = JVMCIENV->asMethod(jvmci_method);
1155   return method->lookup_osr_nmethod_for(entry_bci, comp_level, true) != NULL;


1215         if (methods == NULL || matches(methods, cvf->method(), JVMCIENV)) {
1216           if (initialSkip > 0) {
1217             initialSkip--;
1218           } else {
1219             ScopeDesc* scope = cvf->scope();
1220             // native wrappers do not have a scope
1221             if (scope != NULL && scope->objects() != NULL) {
1222               GrowableArray<ScopeValue*>* objects;
1223               if (!realloc_called) {
1224                 objects = scope->objects();
1225               } else {
1226                 // some object might already have been re-allocated, only reallocate the non-allocated ones
1227                 objects = new GrowableArray<ScopeValue*>(scope->objects()->length());
1228                 for (int i = 0; i < scope->objects()->length(); i++) {
1229                   ObjectValue* sv = (ObjectValue*) scope->objects()->at(i);
1230                   if (sv->value().is_null()) {
1231                     objects->append(sv);
1232                   }
1233                 }
1234               }
1235               bool realloc_failures = Deoptimization::realloc_objects(thread, fst.current(), fst.register_map(), objects, CHECK_NULL);
1236               Deoptimization::reassign_fields(fst.current(), fst.register_map(), objects, realloc_failures, false);
1237               realloc_called = true;
1238 
1239               GrowableArray<ScopeValue*>* local_values = scope->locals();
1240               assert(local_values != NULL, "NULL locals");
1241               typeArrayOop array_oop = oopFactory::new_boolArray(local_values->length(), CHECK_NULL);
1242               typeArrayHandle array(THREAD, array_oop);
1243               for (int i = 0; i < local_values->length(); i++) {
1244                 ScopeValue* value = local_values->at(i);
1245                 if (value->is_object()) {
1246                   array->bool_at_put(i, true);
1247                 }
1248               }
1249               HotSpotJVMCI::HotSpotStackFrameReference::set_localIsVirtual(JVMCIENV, frame_reference(), array());
1250             } else {
1251               HotSpotJVMCI::HotSpotStackFrameReference::set_localIsVirtual(JVMCIENV, frame_reference(), NULL);
1252             }
1253 
1254             locals = cvf->locals();
1255             HotSpotJVMCI::HotSpotStackFrameReference::set_bci(JVMCIENV, frame_reference(), cvf->bci());


1473     if (vf->is_top()) {
1474       break;
1475     }
1476     vf = vf->sender();
1477   }
1478 
1479   int last_frame_number = JVMCIENV->get_HotSpotStackFrameReference_frameNumber(hs_frame);
1480   if (last_frame_number >= virtualFrames->length()) {
1481     JVMCI_THROW_MSG(IllegalStateException, "invalid frame number");
1482   }
1483 
1484   // Reallocate the non-escaping objects and restore their fields.
1485   assert (virtualFrames->at(last_frame_number)->scope() != NULL,"invalid scope");
1486   GrowableArray<ScopeValue*>* objects = virtualFrames->at(last_frame_number)->scope()->objects();
1487 
1488   if (objects == NULL) {
1489     // no objects to materialize
1490     return;
1491   }
1492 
1493   bool realloc_failures = Deoptimization::realloc_objects(thread, fstAfterDeopt.current(), fstAfterDeopt.register_map(), objects, CHECK);
1494   Deoptimization::reassign_fields(fstAfterDeopt.current(), fstAfterDeopt.register_map(), objects, realloc_failures, false);
1495 
1496   for (int frame_index = 0; frame_index < virtualFrames->length(); frame_index++) {
1497     compiledVFrame* cvf = virtualFrames->at(frame_index);
1498 
1499     GrowableArray<ScopeValue*>* scopeLocals = cvf->scope()->locals();
1500     StackValueCollection* locals = cvf->locals();
1501     if (locals != NULL) {
1502       for (int i2 = 0; i2 < locals->size(); i2++) {
1503         StackValue* var = locals->at(i2);
1504         if (var->type() == T_OBJECT && scopeLocals->at(i2)->is_object()) {
1505           jvalue val;
1506           val.l = (jobject) locals->at(i2)->get_obj()();
1507           cvf->update_local(T_OBJECT, i2, val);
1508         }
1509       }
1510     }
1511 
1512     GrowableArray<ScopeValue*>* scopeExpressions = cvf->scope()->expressions();
1513     StackValueCollection* expressions = cvf->expressions();


1617     return -2;
1618   }
1619   jbyte buffer[O_BUFLEN];
1620   while (length > 0) {
1621     int copy_len = MIN2(length, (jint)O_BUFLEN);
1622     JVMCIENV->copy_bytes_to(array, buffer, offset, copy_len);
1623     tty->write((char*) buffer, copy_len);
1624     length -= O_BUFLEN;
1625     offset += O_BUFLEN;
1626   }
1627   if (flush) {
1628     tty->flush();
1629   }
1630   return 0;
1631 C2V_END
1632 
1633 C2V_VMENTRY(void, flushDebugOutput, (JNIEnv* env, jobject))
1634   tty->flush();
1635 C2V_END
1636 
1637 C2V_VMENTRY_0(jint, methodDataProfileDataSize, (JNIEnv* env, jobject, jlong metaspace_method_data, jint position))
1638   MethodData* mdo = JVMCIENV->asMethodData(metaspace_method_data);
1639   ProfileData* profile_data = mdo->data_at(position);
1640   if (mdo->is_valid(profile_data)) {
1641     return profile_data->size_in_bytes();
1642   }
1643   DataLayout* data    = mdo->extra_data_base();
1644   DataLayout* end   = mdo->extra_data_limit();
1645   for (;; data = mdo->next_extra(data)) {
1646     assert(data < end, "moved past end of extra data");
1647     profile_data = data->data_in();
1648     if (mdo->dp_to_di(profile_data->dp()) == position) {
1649       return profile_data->size_in_bytes();
1650     }
1651   }
1652   JVMCI_THROW_MSG_0(IllegalArgumentException, err_msg("Invalid profile data position %d", position));
1653 C2V_END
1654 
1655 C2V_VMENTRY_0(jlong, getFingerprint, (JNIEnv* env, jobject, jlong metaspace_klass))
1656 #if INCLUDE_AOT
1657   Klass *k = (Klass*) (address) metaspace_klass;


1723     JVMCIObject result = JVMCIENV->get_jvmci_type(klass_handle, JVMCI_CHECK_NULL);
1724     return JVMCIENV->get_jobject(result);
1725   }
1726   BasicType type = java_lang_Class::primitive_type(component_mirror);
1727   JVMCIObject result = JVMCIENV->get_jvmci_primitive_type(type);
1728   return JVMCIENV->get_jobject(result);
1729 C2V_END
1730 
1731 C2V_VMENTRY(void, ensureInitialized, (JNIEnv* env, jobject, jobject jvmci_type))
1732   if (jvmci_type == NULL) {
1733     JVMCI_THROW(NullPointerException);
1734   }
1735 
1736   Klass* klass = JVMCIENV->asKlass(jvmci_type);
1737   if (klass != NULL && klass->should_be_initialized()) {
1738     InstanceKlass* k = InstanceKlass::cast(klass);
1739     k->initialize(CHECK);
1740   }
1741 C2V_END
1742 
1743 C2V_VMENTRY_0(jint, interpreterFrameSize, (JNIEnv* env, jobject, jobject bytecode_frame_handle))
1744   if (bytecode_frame_handle == NULL) {
1745     JVMCI_THROW_0(NullPointerException);
1746   }
1747 
1748   JVMCIObject top_bytecode_frame = JVMCIENV->wrap(bytecode_frame_handle);
1749   JVMCIObject bytecode_frame = top_bytecode_frame;
1750   int size = 0;
1751   int callee_parameters = 0;
1752   int callee_locals = 0;
1753   Method* method = JVMCIENV->asMethod(JVMCIENV->get_BytecodePosition_method(bytecode_frame));
1754   int extra_args = method->max_stack() - JVMCIENV->get_BytecodeFrame_numStack(bytecode_frame);
1755 
1756   while (bytecode_frame.is_non_null()) {
1757     int locks = JVMCIENV->get_BytecodeFrame_numLocks(bytecode_frame);
1758     int temps = JVMCIENV->get_BytecodeFrame_numStack(bytecode_frame);
1759     bool is_top_frame = (JVMCIENV->equals(bytecode_frame, top_bytecode_frame));
1760     Method* method = JVMCIENV->asMethod(JVMCIENV->get_BytecodePosition_method(bytecode_frame));
1761 
1762     int frame_size = BytesPerWord * Interpreter::size_activation(method->max_stack(),
1763                                                                  temps + callee_parameters,


1771     callee_parameters = method->size_of_parameters();
1772     callee_locals = method->max_locals();
1773     extra_args = 0;
1774     bytecode_frame = JVMCIENV->get_BytecodePosition_caller(bytecode_frame);
1775   }
1776   return size + Deoptimization::last_frame_adjust(0, callee_locals) * BytesPerWord;
1777 C2V_END
1778 
1779 C2V_VMENTRY(void, compileToBytecode, (JNIEnv* env, jobject, jobject lambda_form_handle))
1780   Handle lambda_form = JVMCIENV->asConstant(JVMCIENV->wrap(lambda_form_handle), JVMCI_CHECK);
1781   if (lambda_form->is_a(SystemDictionary::LambdaForm_klass())) {
1782     TempNewSymbol compileToBytecode = SymbolTable::new_symbol("compileToBytecode");
1783     JavaValue result(T_VOID);
1784     JavaCalls::call_special(&result, lambda_form, SystemDictionary::LambdaForm_klass(), compileToBytecode, vmSymbols::void_method_signature(), CHECK);
1785   } else {
1786     JVMCI_THROW_MSG(IllegalArgumentException,
1787                     err_msg("Unexpected type: %s", lambda_form->klass()->external_name()))
1788   }
1789 C2V_END
1790 
1791 C2V_VMENTRY_0(jint, getIdentityHashCode, (JNIEnv* env, jobject, jobject object))
1792   Handle obj = JVMCIENV->asConstant(JVMCIENV->wrap(object), JVMCI_CHECK_0);
1793   return obj->identity_hash();
1794 C2V_END
1795 
1796 C2V_VMENTRY_0(jboolean, isInternedString, (JNIEnv* env, jobject, jobject object))
1797   Handle str = JVMCIENV->asConstant(JVMCIENV->wrap(object), JVMCI_CHECK_0);
1798   if (!java_lang_String::is_instance(str())) {
1799     return false;
1800   }
1801   int len;
1802   jchar* name = java_lang_String::as_unicode_string(str(), len, CHECK_0);
1803   return (StringTable::lookup(name, len) != NULL);
1804 C2V_END
1805 
1806 
1807 C2V_VMENTRY_NULL(jobject, unboxPrimitive, (JNIEnv* env, jobject, jobject object))
1808   if (object == NULL) {
1809     JVMCI_THROW_0(NullPointerException);
1810   }
1811   Handle box = JVMCIENV->asConstant(JVMCIENV->wrap(object), JVMCI_CHECK_NULL);


2553     JVMCIENV->put_object_at(result, result_index++, entry);
2554   }
2555   return JVMCIENV->get_jobjectArray(result);
2556 }
2557 
2558 C2V_VMENTRY_0(jlong, getFailedSpeculationsAddress, (JNIEnv* env, jobject, jobject jvmci_method))
2559   methodHandle method = JVMCIENV->asMethod(jvmci_method);
2560   MethodData* method_data = method->method_data();
2561   if (method_data == NULL) {
2562     ClassLoaderData* loader_data = method->method_holder()->class_loader_data();
2563     method_data = MethodData::allocate(loader_data, method, CHECK_0);
2564     method->set_method_data(method_data);
2565   }
2566   return (jlong) method_data->get_failed_speculations_address();
2567 }
2568 
2569 C2V_VMENTRY(void, releaseFailedSpeculations, (JNIEnv* env, jobject, jlong failed_speculations_address))
2570   FailedSpeculation::free_failed_speculations((FailedSpeculation**)(address) failed_speculations_address);
2571 }
2572 
2573 C2V_VMENTRY_0(jboolean, addFailedSpeculation, (JNIEnv* env, jobject, jlong failed_speculations_address, jbyteArray speculation_obj))
2574   JVMCIPrimitiveArray speculation_handle = JVMCIENV->wrap(speculation_obj);
2575   int speculation_len = JVMCIENV->get_length(speculation_handle);
2576   char* speculation = NEW_RESOURCE_ARRAY(char, speculation_len);
2577   JVMCIENV->copy_bytes_to(speculation_handle, (jbyte*) speculation, 0, speculation_len);
2578   return FailedSpeculation::add_failed_speculation(NULL, (FailedSpeculation**)(address) failed_speculations_address, (address) speculation, speculation_len);
2579 }
2580 
2581 #define CC (char*)  /*cast a literal from (const char*)*/
2582 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f))
2583 
2584 #define STRING                  "Ljava/lang/String;"
2585 #define OBJECT                  "Ljava/lang/Object;"
2586 #define CLASS                   "Ljava/lang/Class;"
2587 #define OBJECTCONSTANT          "Ljdk/vm/ci/hotspot/HotSpotObjectConstantImpl;"
2588 #define HANDLECONSTANT          "Ljdk/vm/ci/hotspot/IndirectHotSpotObjectConstantImpl;"
2589 #define EXECUTABLE              "Ljava/lang/reflect/Executable;"
2590 #define STACK_TRACE_ELEMENT     "Ljava/lang/StackTraceElement;"
2591 #define INSTALLED_CODE          "Ljdk/vm/ci/code/InstalledCode;"
2592 #define TARGET_DESCRIPTION      "Ljdk/vm/ci/code/TargetDescription;"
2593 #define BYTECODE_FRAME          "Ljdk/vm/ci/code/BytecodeFrame;"


2646   {CC "getClassInitializer",                          CC "(" HS_RESOLVED_KLASS ")" HS_RESOLVED_METHOD,                                      FN_PTR(getClassInitializer)},
2647   {CC "hasFinalizableSubclass",                       CC "(" HS_RESOLVED_KLASS ")Z",                                                        FN_PTR(hasFinalizableSubclass)},
2648   {CC "getMaxCallTargetOffset",                       CC "(J)J",                                                                            FN_PTR(getMaxCallTargetOffset)},
2649   {CC "asResolvedJavaMethod",                         CC "(" EXECUTABLE ")" HS_RESOLVED_METHOD,                                             FN_PTR(asResolvedJavaMethod)},
2650   {CC "getResolvedJavaMethod",                        CC "(" OBJECTCONSTANT "J)" HS_RESOLVED_METHOD,                                        FN_PTR(getResolvedJavaMethod)},
2651   {CC "getConstantPool",                              CC "(" METASPACE_OBJECT ")" HS_CONSTANT_POOL,                                         FN_PTR(getConstantPool)},
2652   {CC "getResolvedJavaType0",                         CC "(Ljava/lang/Object;JZ)" HS_RESOLVED_KLASS,                                        FN_PTR(getResolvedJavaType0)},
2653   {CC "readConfiguration",                            CC "()[" OBJECT,                                                                      FN_PTR(readConfiguration)},
2654   {CC "installCode",                                  CC "(" TARGET_DESCRIPTION HS_COMPILED_CODE INSTALLED_CODE "J[B)I",                    FN_PTR(installCode)},
2655   {CC "getMetadata",                                  CC "(" TARGET_DESCRIPTION HS_COMPILED_CODE HS_METADATA ")I",                          FN_PTR(getMetadata)},
2656   {CC "resetCompilationStatistics",                   CC "()V",                                                                             FN_PTR(resetCompilationStatistics)},
2657   {CC "disassembleCodeBlob",                          CC "(" INSTALLED_CODE ")" STRING,                                                     FN_PTR(disassembleCodeBlob)},
2658   {CC "executeHotSpotNmethod",                        CC "([" OBJECT HS_NMETHOD ")" OBJECT,                                                 FN_PTR(executeHotSpotNmethod)},
2659   {CC "getLineNumberTable",                           CC "(" HS_RESOLVED_METHOD ")[J",                                                      FN_PTR(getLineNumberTable)},
2660   {CC "getLocalVariableTableStart",                   CC "(" HS_RESOLVED_METHOD ")J",                                                       FN_PTR(getLocalVariableTableStart)},
2661   {CC "getLocalVariableTableLength",                  CC "(" HS_RESOLVED_METHOD ")I",                                                       FN_PTR(getLocalVariableTableLength)},
2662   {CC "reprofile",                                    CC "(" HS_RESOLVED_METHOD ")V",                                                       FN_PTR(reprofile)},
2663   {CC "invalidateHotSpotNmethod",                     CC "(" HS_NMETHOD ")V",                                                               FN_PTR(invalidateHotSpotNmethod)},
2664   {CC "readUncompressedOop",                          CC "(J)" OBJECTCONSTANT,                                                              FN_PTR(readUncompressedOop)},
2665   {CC "collectCounters",                              CC "()[J",                                                                            FN_PTR(collectCounters)},
2666   {CC "getCountersSize",                              CC "()I",                                                                             FN_PTR(getCountersSize)},
2667   {CC "setCountersSize",                              CC "(I)Z",                                                                            FN_PTR(setCountersSize)},
2668   {CC "allocateCompileId",                            CC "(" HS_RESOLVED_METHOD "I)I",                                                      FN_PTR(allocateCompileId)},
2669   {CC "isMature",                                     CC "(" METASPACE_METHOD_DATA ")Z",                                                    FN_PTR(isMature)},
2670   {CC "hasCompiledCodeForOSR",                        CC "(" HS_RESOLVED_METHOD "II)Z",                                                     FN_PTR(hasCompiledCodeForOSR)},
2671   {CC "getSymbol",                                    CC "(J)" STRING,                                                                      FN_PTR(getSymbol)},
2672   {CC "iterateFrames",                                CC "([" RESOLVED_METHOD "[" RESOLVED_METHOD "I" INSPECTED_FRAME_VISITOR ")" OBJECT,   FN_PTR(iterateFrames)},
2673   {CC "materializeVirtualObjects",                    CC "(" HS_STACK_FRAME_REF "Z)V",                                                      FN_PTR(materializeVirtualObjects)},
2674   {CC "shouldDebugNonSafepoints",                     CC "()Z",                                                                             FN_PTR(shouldDebugNonSafepoints)},
2675   {CC "writeDebugOutput",                             CC "([BIIZZ)I",                                                                       FN_PTR(writeDebugOutput)},
2676   {CC "flushDebugOutput",                             CC "()V",                                                                             FN_PTR(flushDebugOutput)},
2677   {CC "methodDataProfileDataSize",                    CC "(JI)I",                                                                           FN_PTR(methodDataProfileDataSize)},
2678   {CC "getFingerprint",                               CC "(J)J",                                                                            FN_PTR(getFingerprint)},
2679   {CC "getHostClass",                                 CC "(" HS_RESOLVED_KLASS ")" HS_RESOLVED_KLASS,                                       FN_PTR(getHostClass)},
2680   {CC "interpreterFrameSize",                         CC "(" BYTECODE_FRAME ")I",                                                           FN_PTR(interpreterFrameSize)},
2681   {CC "compileToBytecode",                            CC "(" OBJECTCONSTANT ")V",                                                           FN_PTR(compileToBytecode)},
2682   {CC "getFlagValue",                                 CC "(" STRING ")" OBJECT,                                                             FN_PTR(getFlagValue)},
2683   {CC "getObjectAtAddress",                           CC "(J)" OBJECT,                                                                      FN_PTR(getObjectAtAddress)},
2684   {CC "getInterfaces",                                CC "(" HS_RESOLVED_KLASS ")[" HS_RESOLVED_KLASS,                                      FN_PTR(getInterfaces)},
2685   {CC "getComponentType",                             CC "(" HS_RESOLVED_KLASS ")" HS_RESOLVED_TYPE,                                        FN_PTR(getComponentType)},
2686   {CC "ensureInitialized",                            CC "(" HS_RESOLVED_KLASS ")V",                                                        FN_PTR(ensureInitialized)},
2687   {CC "getIdentityHashCode",                          CC "(" OBJECTCONSTANT ")I",                                                           FN_PTR(getIdentityHashCode)},




 436       }
 437     }
 438     klass = *((Klass**) (intptr_t) (base_address + offset));
 439   } else {
 440     JVMCI_THROW_MSG_NULL(IllegalArgumentException,
 441                 err_msg("Unexpected arguments: %s " JLONG_FORMAT " %s",
 442                         base_object.is_non_null() ? JVMCIENV->klass_name(base_object) : "null",
 443                         offset, compressed ? "true" : "false"));
 444   }
 445   assert (klass == NULL || klass->is_klass(), "invalid read");
 446   JVMCIObject result = JVMCIENV->get_jvmci_type(klass, JVMCI_CHECK_NULL);
 447   return JVMCIENV->get_jobject(result);
 448 }
 449 
 450 C2V_VMENTRY_NULL(jobject, findUniqueConcreteMethod, (JNIEnv* env, jobject, jobject jvmci_type, jobject jvmci_method))
 451   methodHandle method = JVMCIENV->asMethod(jvmci_method);
 452   Klass* holder = JVMCIENV->asKlass(jvmci_type);
 453   if (holder->is_interface()) {
 454     JVMCI_THROW_MSG_NULL(InternalError, err_msg("Interface %s should be handled in Java code", holder->external_name()));
 455   }



 456 
 457   methodHandle ucm;
 458   {
 459     MutexLocker locker(Compile_lock);
 460     ucm = Dependencies::find_unique_concrete_method(holder, method());
 461   }
 462   JVMCIObject result = JVMCIENV->get_jvmci_method(ucm, JVMCI_CHECK_NULL);
 463   return JVMCIENV->get_jobject(result);
 464 C2V_END
 465 
 466 C2V_VMENTRY_NULL(jobject, getImplementor, (JNIEnv* env, jobject, jobject jvmci_type))
 467   Klass* klass = JVMCIENV->asKlass(jvmci_type);
 468   if (!klass->is_interface()) {
 469     THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(),
 470         err_msg("Expected interface type, got %s", klass->external_name()));
 471   }
 472   InstanceKlass* iklass = InstanceKlass::cast(klass);
 473   JVMCIKlassHandle handle(THREAD);
 474   {
 475     // Need Compile_lock around implementor()


 904 
 905   int nr_meta_refs = recorder->nr_meta_refs();
 906   JVMCIObjectArray metadataArray = JVMCIENV->new_Object_array(nr_meta_refs, JVMCI_CHECK_(JVMCI::cache_full));
 907   for (int i = 0; i < nr_meta_refs; ++i) {
 908     jobject element = recorder->meta_element(i);
 909     if (element == NULL) {
 910       return JVMCI::cache_full;
 911     }
 912     JVMCIENV->put_object_at(metadataArray, i, JVMCIENV->wrap(element));
 913   }
 914   HotSpotJVMCI::HotSpotMetaData::set_metadata(JVMCIENV, metadata_handle, metadataArray);
 915 
 916   ExceptionHandlerTable* handler = code_metadata.get_exception_table();
 917   int table_size = handler->size_in_bytes();
 918   JVMCIPrimitiveArray exceptionArray = JVMCIENV->new_byteArray(table_size, JVMCI_CHECK_(JVMCI::cache_full));
 919   if (table_size > 0) {
 920     handler->copy_bytes_to((address) HotSpotJVMCI::resolve(exceptionArray)->byte_at_addr(0));
 921   }
 922   HotSpotJVMCI::HotSpotMetaData::set_exceptionBytes(JVMCIENV, metadata_handle, exceptionArray);
 923 








 924   return result;
 925 #else
 926   JVMCI_THROW_MSG_0(InternalError, "unimplemented");
 927 #endif
 928 C2V_END
 929 
 930 C2V_VMENTRY(void, resetCompilationStatistics, (JNIEnv* env, jobject))
 931   JVMCICompiler* compiler = JVMCICompiler::instance(true, CHECK);
 932   CompilerStatistics* stats = compiler->stats();
 933   stats->_standard.reset();
 934   stats->_osr.reset();
 935 C2V_END
 936 
 937 C2V_VMENTRY_NULL(jobject, disassembleCodeBlob, (JNIEnv* env, jobject, jobject installedCode))
 938   HandleMark hm;
 939 
 940   if (installedCode == NULL) {
 941     JVMCI_THROW_MSG_NULL(NullPointerException, "installedCode is null");
 942   }
 943 


1096   JVMCIObject nmethod_mirror = JVMCIENV->wrap(hs_nmethod);
1097   JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, JVMCI_CHECK);
1098 C2V_END
1099 
1100 C2V_VMENTRY_NULL(jobject, readUncompressedOop, (JNIEnv* env, jobject, jlong addr))
1101   oop ret = RawAccess<>::oop_load((oop*)(address)addr);
1102   return JVMCIENV->get_jobject(JVMCIENV->get_object_constant(ret));
1103  C2V_END
1104 
1105 C2V_VMENTRY_NULL(jlongArray, collectCounters, (JNIEnv* env, jobject))
1106   // Returns a zero length array if counters aren't enabled
1107   JVMCIPrimitiveArray array = JVMCIENV->new_longArray(JVMCICounterSize, JVMCI_CHECK_NULL);
1108   if (JVMCICounterSize > 0) {
1109     jlong* temp_array = NEW_RESOURCE_ARRAY(jlong, JVMCICounterSize);
1110     JavaThread::collect_counters(temp_array, JVMCICounterSize);
1111     JVMCIENV->copy_longs_from(temp_array, array, 0, JVMCICounterSize);
1112   }
1113   return (jlongArray) JVMCIENV->get_jobject(array);
1114 C2V_END
1115 
1116 C2V_VMENTRY_0(int, allocateCompileId, (JNIEnv* env, jobject, jobject jvmci_method, int entry_bci))








1117   HandleMark hm;
1118   if (jvmci_method == NULL) {
1119     JVMCI_THROW_0(NullPointerException);
1120   }
1121   Method* method = JVMCIENV->asMethod(jvmci_method);
1122   if (entry_bci >= method->code_size() || entry_bci < -1) {
1123     JVMCI_THROW_MSG_0(IllegalArgumentException, err_msg("Unexpected bci %d", entry_bci));
1124   }
1125   return CompileBroker::assign_compile_id_unlocked(THREAD, method, entry_bci);
1126 C2V_END
1127 
1128 
1129 C2V_VMENTRY_0(jboolean, isMature, (JNIEnv* env, jobject, jlong metaspace_method_data))
1130   MethodData* mdo = JVMCIENV->asMethodData(metaspace_method_data);
1131   return mdo != NULL && mdo->is_mature();
1132 C2V_END
1133 
1134 C2V_VMENTRY_0(jboolean, hasCompiledCodeForOSR, (JNIEnv* env, jobject, jobject jvmci_method, int entry_bci, int comp_level))
1135   Method* method = JVMCIENV->asMethod(jvmci_method);
1136   return method->lookup_osr_nmethod_for(entry_bci, comp_level, true) != NULL;


1196         if (methods == NULL || matches(methods, cvf->method(), JVMCIENV)) {
1197           if (initialSkip > 0) {
1198             initialSkip--;
1199           } else {
1200             ScopeDesc* scope = cvf->scope();
1201             // native wrappers do not have a scope
1202             if (scope != NULL && scope->objects() != NULL) {
1203               GrowableArray<ScopeValue*>* objects;
1204               if (!realloc_called) {
1205                 objects = scope->objects();
1206               } else {
1207                 // some object might already have been re-allocated, only reallocate the non-allocated ones
1208                 objects = new GrowableArray<ScopeValue*>(scope->objects()->length());
1209                 for (int i = 0; i < scope->objects()->length(); i++) {
1210                   ObjectValue* sv = (ObjectValue*) scope->objects()->at(i);
1211                   if (sv->value().is_null()) {
1212                     objects->append(sv);
1213                   }
1214                 }
1215               }
1216               bool realloc_failures = Deoptimization::realloc_objects(thread, fst.current(), objects, CHECK_NULL);
1217               Deoptimization::reassign_fields(fst.current(), fst.register_map(), objects, realloc_failures, false);
1218               realloc_called = true;
1219 
1220               GrowableArray<ScopeValue*>* local_values = scope->locals();
1221               assert(local_values != NULL, "NULL locals");
1222               typeArrayOop array_oop = oopFactory::new_boolArray(local_values->length(), CHECK_NULL);
1223               typeArrayHandle array(THREAD, array_oop);
1224               for (int i = 0; i < local_values->length(); i++) {
1225                 ScopeValue* value = local_values->at(i);
1226                 if (value->is_object()) {
1227                   array->bool_at_put(i, true);
1228                 }
1229               }
1230               HotSpotJVMCI::HotSpotStackFrameReference::set_localIsVirtual(JVMCIENV, frame_reference(), array());
1231             } else {
1232               HotSpotJVMCI::HotSpotStackFrameReference::set_localIsVirtual(JVMCIENV, frame_reference(), NULL);
1233             }
1234 
1235             locals = cvf->locals();
1236             HotSpotJVMCI::HotSpotStackFrameReference::set_bci(JVMCIENV, frame_reference(), cvf->bci());


1454     if (vf->is_top()) {
1455       break;
1456     }
1457     vf = vf->sender();
1458   }
1459 
1460   int last_frame_number = JVMCIENV->get_HotSpotStackFrameReference_frameNumber(hs_frame);
1461   if (last_frame_number >= virtualFrames->length()) {
1462     JVMCI_THROW_MSG(IllegalStateException, "invalid frame number");
1463   }
1464 
1465   // Reallocate the non-escaping objects and restore their fields.
1466   assert (virtualFrames->at(last_frame_number)->scope() != NULL,"invalid scope");
1467   GrowableArray<ScopeValue*>* objects = virtualFrames->at(last_frame_number)->scope()->objects();
1468 
1469   if (objects == NULL) {
1470     // no objects to materialize
1471     return;
1472   }
1473 
1474   bool realloc_failures = Deoptimization::realloc_objects(thread, fstAfterDeopt.current(), objects, CHECK);
1475   Deoptimization::reassign_fields(fstAfterDeopt.current(), fstAfterDeopt.register_map(), objects, realloc_failures, false);
1476 
1477   for (int frame_index = 0; frame_index < virtualFrames->length(); frame_index++) {
1478     compiledVFrame* cvf = virtualFrames->at(frame_index);
1479 
1480     GrowableArray<ScopeValue*>* scopeLocals = cvf->scope()->locals();
1481     StackValueCollection* locals = cvf->locals();
1482     if (locals != NULL) {
1483       for (int i2 = 0; i2 < locals->size(); i2++) {
1484         StackValue* var = locals->at(i2);
1485         if (var->type() == T_OBJECT && scopeLocals->at(i2)->is_object()) {
1486           jvalue val;
1487           val.l = (jobject) locals->at(i2)->get_obj()();
1488           cvf->update_local(T_OBJECT, i2, val);
1489         }
1490       }
1491     }
1492 
1493     GrowableArray<ScopeValue*>* scopeExpressions = cvf->scope()->expressions();
1494     StackValueCollection* expressions = cvf->expressions();


1598     return -2;
1599   }
1600   jbyte buffer[O_BUFLEN];
1601   while (length > 0) {
1602     int copy_len = MIN2(length, (jint)O_BUFLEN);
1603     JVMCIENV->copy_bytes_to(array, buffer, offset, copy_len);
1604     tty->write((char*) buffer, copy_len);
1605     length -= O_BUFLEN;
1606     offset += O_BUFLEN;
1607   }
1608   if (flush) {
1609     tty->flush();
1610   }
1611   return 0;
1612 C2V_END
1613 
1614 C2V_VMENTRY(void, flushDebugOutput, (JNIEnv* env, jobject))
1615   tty->flush();
1616 C2V_END
1617 
1618 C2V_VMENTRY_0(int, methodDataProfileDataSize, (JNIEnv* env, jobject, jlong metaspace_method_data, jint position))
1619   MethodData* mdo = JVMCIENV->asMethodData(metaspace_method_data);
1620   ProfileData* profile_data = mdo->data_at(position);
1621   if (mdo->is_valid(profile_data)) {
1622     return profile_data->size_in_bytes();
1623   }
1624   DataLayout* data    = mdo->extra_data_base();
1625   DataLayout* end   = mdo->extra_data_limit();
1626   for (;; data = mdo->next_extra(data)) {
1627     assert(data < end, "moved past end of extra data");
1628     profile_data = data->data_in();
1629     if (mdo->dp_to_di(profile_data->dp()) == position) {
1630       return profile_data->size_in_bytes();
1631     }
1632   }
1633   JVMCI_THROW_MSG_0(IllegalArgumentException, err_msg("Invalid profile data position %d", position));
1634 C2V_END
1635 
1636 C2V_VMENTRY_0(jlong, getFingerprint, (JNIEnv* env, jobject, jlong metaspace_klass))
1637 #if INCLUDE_AOT
1638   Klass *k = (Klass*) (address) metaspace_klass;


1704     JVMCIObject result = JVMCIENV->get_jvmci_type(klass_handle, JVMCI_CHECK_NULL);
1705     return JVMCIENV->get_jobject(result);
1706   }
1707   BasicType type = java_lang_Class::primitive_type(component_mirror);
1708   JVMCIObject result = JVMCIENV->get_jvmci_primitive_type(type);
1709   return JVMCIENV->get_jobject(result);
1710 C2V_END
1711 
1712 C2V_VMENTRY(void, ensureInitialized, (JNIEnv* env, jobject, jobject jvmci_type))
1713   if (jvmci_type == NULL) {
1714     JVMCI_THROW(NullPointerException);
1715   }
1716 
1717   Klass* klass = JVMCIENV->asKlass(jvmci_type);
1718   if (klass != NULL && klass->should_be_initialized()) {
1719     InstanceKlass* k = InstanceKlass::cast(klass);
1720     k->initialize(CHECK);
1721   }
1722 C2V_END
1723 
1724 C2V_VMENTRY_0(int, interpreterFrameSize, (JNIEnv* env, jobject, jobject bytecode_frame_handle))
1725   if (bytecode_frame_handle == NULL) {
1726     JVMCI_THROW_0(NullPointerException);
1727   }
1728 
1729   JVMCIObject top_bytecode_frame = JVMCIENV->wrap(bytecode_frame_handle);
1730   JVMCIObject bytecode_frame = top_bytecode_frame;
1731   int size = 0;
1732   int callee_parameters = 0;
1733   int callee_locals = 0;
1734   Method* method = JVMCIENV->asMethod(JVMCIENV->get_BytecodePosition_method(bytecode_frame));
1735   int extra_args = method->max_stack() - JVMCIENV->get_BytecodeFrame_numStack(bytecode_frame);
1736 
1737   while (bytecode_frame.is_non_null()) {
1738     int locks = JVMCIENV->get_BytecodeFrame_numLocks(bytecode_frame);
1739     int temps = JVMCIENV->get_BytecodeFrame_numStack(bytecode_frame);
1740     bool is_top_frame = (JVMCIENV->equals(bytecode_frame, top_bytecode_frame));
1741     Method* method = JVMCIENV->asMethod(JVMCIENV->get_BytecodePosition_method(bytecode_frame));
1742 
1743     int frame_size = BytesPerWord * Interpreter::size_activation(method->max_stack(),
1744                                                                  temps + callee_parameters,


1752     callee_parameters = method->size_of_parameters();
1753     callee_locals = method->max_locals();
1754     extra_args = 0;
1755     bytecode_frame = JVMCIENV->get_BytecodePosition_caller(bytecode_frame);
1756   }
1757   return size + Deoptimization::last_frame_adjust(0, callee_locals) * BytesPerWord;
1758 C2V_END
1759 
1760 C2V_VMENTRY(void, compileToBytecode, (JNIEnv* env, jobject, jobject lambda_form_handle))
1761   Handle lambda_form = JVMCIENV->asConstant(JVMCIENV->wrap(lambda_form_handle), JVMCI_CHECK);
1762   if (lambda_form->is_a(SystemDictionary::LambdaForm_klass())) {
1763     TempNewSymbol compileToBytecode = SymbolTable::new_symbol("compileToBytecode");
1764     JavaValue result(T_VOID);
1765     JavaCalls::call_special(&result, lambda_form, SystemDictionary::LambdaForm_klass(), compileToBytecode, vmSymbols::void_method_signature(), CHECK);
1766   } else {
1767     JVMCI_THROW_MSG(IllegalArgumentException,
1768                     err_msg("Unexpected type: %s", lambda_form->klass()->external_name()))
1769   }
1770 C2V_END
1771 
1772 C2V_VMENTRY_0(int, getIdentityHashCode, (JNIEnv* env, jobject, jobject object))
1773   Handle obj = JVMCIENV->asConstant(JVMCIENV->wrap(object), JVMCI_CHECK_0);
1774   return obj->identity_hash();
1775 C2V_END
1776 
1777 C2V_VMENTRY_0(jboolean, isInternedString, (JNIEnv* env, jobject, jobject object))
1778   Handle str = JVMCIENV->asConstant(JVMCIENV->wrap(object), JVMCI_CHECK_0);
1779   if (!java_lang_String::is_instance(str())) {
1780     return false;
1781   }
1782   int len;
1783   jchar* name = java_lang_String::as_unicode_string(str(), len, CHECK_0);
1784   return (StringTable::lookup(name, len) != NULL);
1785 C2V_END
1786 
1787 
1788 C2V_VMENTRY_NULL(jobject, unboxPrimitive, (JNIEnv* env, jobject, jobject object))
1789   if (object == NULL) {
1790     JVMCI_THROW_0(NullPointerException);
1791   }
1792   Handle box = JVMCIENV->asConstant(JVMCIENV->wrap(object), JVMCI_CHECK_NULL);


2534     JVMCIENV->put_object_at(result, result_index++, entry);
2535   }
2536   return JVMCIENV->get_jobjectArray(result);
2537 }
2538 
2539 C2V_VMENTRY_0(jlong, getFailedSpeculationsAddress, (JNIEnv* env, jobject, jobject jvmci_method))
2540   methodHandle method = JVMCIENV->asMethod(jvmci_method);
2541   MethodData* method_data = method->method_data();
2542   if (method_data == NULL) {
2543     ClassLoaderData* loader_data = method->method_holder()->class_loader_data();
2544     method_data = MethodData::allocate(loader_data, method, CHECK_0);
2545     method->set_method_data(method_data);
2546   }
2547   return (jlong) method_data->get_failed_speculations_address();
2548 }
2549 
2550 C2V_VMENTRY(void, releaseFailedSpeculations, (JNIEnv* env, jobject, jlong failed_speculations_address))
2551   FailedSpeculation::free_failed_speculations((FailedSpeculation**)(address) failed_speculations_address);
2552 }
2553 
2554 C2V_VMENTRY_0(bool, addFailedSpeculation, (JNIEnv* env, jobject, jlong failed_speculations_address, jbyteArray speculation_obj))
2555   JVMCIPrimitiveArray speculation_handle = JVMCIENV->wrap(speculation_obj);
2556   int speculation_len = JVMCIENV->get_length(speculation_handle);
2557   char* speculation = NEW_RESOURCE_ARRAY(char, speculation_len);
2558   JVMCIENV->copy_bytes_to(speculation_handle, (jbyte*) speculation, 0, speculation_len);
2559   return FailedSpeculation::add_failed_speculation(NULL, (FailedSpeculation**)(address) failed_speculations_address, (address) speculation, speculation_len);
2560 }
2561 
2562 #define CC (char*)  /*cast a literal from (const char*)*/
2563 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f))
2564 
2565 #define STRING                  "Ljava/lang/String;"
2566 #define OBJECT                  "Ljava/lang/Object;"
2567 #define CLASS                   "Ljava/lang/Class;"
2568 #define OBJECTCONSTANT          "Ljdk/vm/ci/hotspot/HotSpotObjectConstantImpl;"
2569 #define HANDLECONSTANT          "Ljdk/vm/ci/hotspot/IndirectHotSpotObjectConstantImpl;"
2570 #define EXECUTABLE              "Ljava/lang/reflect/Executable;"
2571 #define STACK_TRACE_ELEMENT     "Ljava/lang/StackTraceElement;"
2572 #define INSTALLED_CODE          "Ljdk/vm/ci/code/InstalledCode;"
2573 #define TARGET_DESCRIPTION      "Ljdk/vm/ci/code/TargetDescription;"
2574 #define BYTECODE_FRAME          "Ljdk/vm/ci/code/BytecodeFrame;"


2627   {CC "getClassInitializer",                          CC "(" HS_RESOLVED_KLASS ")" HS_RESOLVED_METHOD,                                      FN_PTR(getClassInitializer)},
2628   {CC "hasFinalizableSubclass",                       CC "(" HS_RESOLVED_KLASS ")Z",                                                        FN_PTR(hasFinalizableSubclass)},
2629   {CC "getMaxCallTargetOffset",                       CC "(J)J",                                                                            FN_PTR(getMaxCallTargetOffset)},
2630   {CC "asResolvedJavaMethod",                         CC "(" EXECUTABLE ")" HS_RESOLVED_METHOD,                                             FN_PTR(asResolvedJavaMethod)},
2631   {CC "getResolvedJavaMethod",                        CC "(" OBJECTCONSTANT "J)" HS_RESOLVED_METHOD,                                        FN_PTR(getResolvedJavaMethod)},
2632   {CC "getConstantPool",                              CC "(" METASPACE_OBJECT ")" HS_CONSTANT_POOL,                                         FN_PTR(getConstantPool)},
2633   {CC "getResolvedJavaType0",                         CC "(Ljava/lang/Object;JZ)" HS_RESOLVED_KLASS,                                        FN_PTR(getResolvedJavaType0)},
2634   {CC "readConfiguration",                            CC "()[" OBJECT,                                                                      FN_PTR(readConfiguration)},
2635   {CC "installCode",                                  CC "(" TARGET_DESCRIPTION HS_COMPILED_CODE INSTALLED_CODE "J[B)I",                    FN_PTR(installCode)},
2636   {CC "getMetadata",                                  CC "(" TARGET_DESCRIPTION HS_COMPILED_CODE HS_METADATA ")I",                          FN_PTR(getMetadata)},
2637   {CC "resetCompilationStatistics",                   CC "()V",                                                                             FN_PTR(resetCompilationStatistics)},
2638   {CC "disassembleCodeBlob",                          CC "(" INSTALLED_CODE ")" STRING,                                                     FN_PTR(disassembleCodeBlob)},
2639   {CC "executeHotSpotNmethod",                        CC "([" OBJECT HS_NMETHOD ")" OBJECT,                                                 FN_PTR(executeHotSpotNmethod)},
2640   {CC "getLineNumberTable",                           CC "(" HS_RESOLVED_METHOD ")[J",                                                      FN_PTR(getLineNumberTable)},
2641   {CC "getLocalVariableTableStart",                   CC "(" HS_RESOLVED_METHOD ")J",                                                       FN_PTR(getLocalVariableTableStart)},
2642   {CC "getLocalVariableTableLength",                  CC "(" HS_RESOLVED_METHOD ")I",                                                       FN_PTR(getLocalVariableTableLength)},
2643   {CC "reprofile",                                    CC "(" HS_RESOLVED_METHOD ")V",                                                       FN_PTR(reprofile)},
2644   {CC "invalidateHotSpotNmethod",                     CC "(" HS_NMETHOD ")V",                                                               FN_PTR(invalidateHotSpotNmethod)},
2645   {CC "readUncompressedOop",                          CC "(J)" OBJECTCONSTANT,                                                              FN_PTR(readUncompressedOop)},
2646   {CC "collectCounters",                              CC "()[J",                                                                            FN_PTR(collectCounters)},


2647   {CC "allocateCompileId",                            CC "(" HS_RESOLVED_METHOD "I)I",                                                      FN_PTR(allocateCompileId)},
2648   {CC "isMature",                                     CC "(" METASPACE_METHOD_DATA ")Z",                                                    FN_PTR(isMature)},
2649   {CC "hasCompiledCodeForOSR",                        CC "(" HS_RESOLVED_METHOD "II)Z",                                                     FN_PTR(hasCompiledCodeForOSR)},
2650   {CC "getSymbol",                                    CC "(J)" STRING,                                                                      FN_PTR(getSymbol)},
2651   {CC "iterateFrames",                                CC "([" RESOLVED_METHOD "[" RESOLVED_METHOD "I" INSPECTED_FRAME_VISITOR ")" OBJECT,   FN_PTR(iterateFrames)},
2652   {CC "materializeVirtualObjects",                    CC "(" HS_STACK_FRAME_REF "Z)V",                                                      FN_PTR(materializeVirtualObjects)},
2653   {CC "shouldDebugNonSafepoints",                     CC "()Z",                                                                             FN_PTR(shouldDebugNonSafepoints)},
2654   {CC "writeDebugOutput",                             CC "([BIIZZ)I",                                                                       FN_PTR(writeDebugOutput)},
2655   {CC "flushDebugOutput",                             CC "()V",                                                                             FN_PTR(flushDebugOutput)},
2656   {CC "methodDataProfileDataSize",                    CC "(JI)I",                                                                           FN_PTR(methodDataProfileDataSize)},
2657   {CC "getFingerprint",                               CC "(J)J",                                                                            FN_PTR(getFingerprint)},
2658   {CC "getHostClass",                                 CC "(" HS_RESOLVED_KLASS ")" HS_RESOLVED_KLASS,                                       FN_PTR(getHostClass)},
2659   {CC "interpreterFrameSize",                         CC "(" BYTECODE_FRAME ")I",                                                           FN_PTR(interpreterFrameSize)},
2660   {CC "compileToBytecode",                            CC "(" OBJECTCONSTANT ")V",                                                           FN_PTR(compileToBytecode)},
2661   {CC "getFlagValue",                                 CC "(" STRING ")" OBJECT,                                                             FN_PTR(getFlagValue)},
2662   {CC "getObjectAtAddress",                           CC "(J)" OBJECT,                                                                      FN_PTR(getObjectAtAddress)},
2663   {CC "getInterfaces",                                CC "(" HS_RESOLVED_KLASS ")[" HS_RESOLVED_KLASS,                                      FN_PTR(getInterfaces)},
2664   {CC "getComponentType",                             CC "(" HS_RESOLVED_KLASS ")" HS_RESOLVED_TYPE,                                        FN_PTR(getComponentType)},
2665   {CC "ensureInitialized",                            CC "(" HS_RESOLVED_KLASS ")V",                                                        FN_PTR(ensureInitialized)},
2666   {CC "getIdentityHashCode",                          CC "(" OBJECTCONSTANT ")I",                                                           FN_PTR(getIdentityHashCode)},


< prev index next >