< prev index next >

src/hotspot/share/c1/c1_Runtime1.cpp

Print this page

  32 #include "classfile/vmClasses.hpp"
  33 #include "classfile/vmSymbols.hpp"
  34 #include "code/codeBlob.hpp"
  35 #include "code/compiledIC.hpp"
  36 #include "code/scopeDesc.hpp"
  37 #include "code/vtableStubs.hpp"
  38 #include "compiler/compilationPolicy.hpp"
  39 #include "compiler/disassembler.hpp"
  40 #include "compiler/oopMap.hpp"
  41 #include "gc/shared/barrierSet.hpp"
  42 #include "gc/shared/c1/barrierSetC1.hpp"
  43 #include "gc/shared/collectedHeap.hpp"
  44 #include "interpreter/bytecode.hpp"
  45 #include "interpreter/interpreter.hpp"
  46 #include "jfr/support/jfrIntrinsics.hpp"
  47 #include "logging/log.hpp"
  48 #include "memory/oopFactory.hpp"
  49 #include "memory/resourceArea.hpp"
  50 #include "memory/universe.hpp"
  51 #include "oops/access.inline.hpp"


  52 #include "oops/objArrayOop.inline.hpp"
  53 #include "oops/objArrayKlass.hpp"
  54 #include "oops/oop.inline.hpp"
  55 #include "prims/jvmtiExport.hpp"
  56 #include "runtime/atomic.hpp"
  57 #include "runtime/fieldDescriptor.inline.hpp"
  58 #include "runtime/frame.inline.hpp"
  59 #include "runtime/handles.inline.hpp"
  60 #include "runtime/interfaceSupport.inline.hpp"
  61 #include "runtime/javaCalls.hpp"
  62 #include "runtime/sharedRuntime.hpp"
  63 #include "runtime/stackWatermarkSet.hpp"
  64 #include "runtime/stubRoutines.hpp"
  65 #include "runtime/vframe.inline.hpp"
  66 #include "runtime/vframeArray.hpp"
  67 #include "runtime/vm_version.hpp"
  68 #include "utilities/copy.hpp"
  69 #include "utilities/events.hpp"
  70 
  71 

 102 }
 103 
 104 // Implementation of Runtime1
 105 
 106 CodeBlob* Runtime1::_blobs[(int)C1StubId::NUM_STUBIDS];
 107 
 108 #define C1_BLOB_NAME_DEFINE(name)  "C1 Runtime " # name "_blob",
 109 const char *Runtime1::_blob_names[] = {
 110   C1_STUBS_DO(C1_BLOB_NAME_DEFINE)
 111 };
 112 #undef C1_STUB_NAME_DEFINE
 113 
 114 #ifndef PRODUCT
 115 // statistics
 116 uint Runtime1::_generic_arraycopystub_cnt = 0;
 117 uint Runtime1::_arraycopy_slowcase_cnt = 0;
 118 uint Runtime1::_arraycopy_checkcast_cnt = 0;
 119 uint Runtime1::_arraycopy_checkcast_attempt_cnt = 0;
 120 uint Runtime1::_new_type_array_slowcase_cnt = 0;
 121 uint Runtime1::_new_object_array_slowcase_cnt = 0;

 122 uint Runtime1::_new_instance_slowcase_cnt = 0;
 123 uint Runtime1::_new_multi_array_slowcase_cnt = 0;





 124 uint Runtime1::_monitorenter_slowcase_cnt = 0;
 125 uint Runtime1::_monitorexit_slowcase_cnt = 0;
 126 uint Runtime1::_patch_code_slowcase_cnt = 0;
 127 uint Runtime1::_throw_range_check_exception_count = 0;
 128 uint Runtime1::_throw_index_exception_count = 0;
 129 uint Runtime1::_throw_div0_exception_count = 0;
 130 uint Runtime1::_throw_null_pointer_exception_count = 0;
 131 uint Runtime1::_throw_class_cast_exception_count = 0;
 132 uint Runtime1::_throw_incompatible_class_change_error_count = 0;


 133 uint Runtime1::_throw_count = 0;
 134 
 135 static uint _byte_arraycopy_stub_cnt = 0;
 136 static uint _short_arraycopy_stub_cnt = 0;
 137 static uint _int_arraycopy_stub_cnt = 0;
 138 static uint _long_arraycopy_stub_cnt = 0;
 139 static uint _oop_arraycopy_stub_cnt = 0;
 140 
 141 address Runtime1::arraycopy_count_address(BasicType type) {
 142   switch (type) {
 143   case T_BOOLEAN:
 144   case T_BYTE:   return (address)&_byte_arraycopy_stub_cnt;
 145   case T_CHAR:
 146   case T_SHORT:  return (address)&_short_arraycopy_stub_cnt;
 147   case T_FLOAT:
 148   case T_INT:    return (address)&_int_arraycopy_stub_cnt;
 149   case T_DOUBLE:
 150   case T_LONG:   return (address)&_long_arraycopy_stub_cnt;
 151   case T_ARRAY:
 152   case T_OBJECT: return (address)&_oop_arraycopy_stub_cnt;

 333   FUNCTION_CASE(entry, JfrTime::time_function());
 334 #endif
 335   FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32());
 336   FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32C());
 337   FUNCTION_CASE(entry, StubRoutines::vectorizedMismatch());
 338   FUNCTION_CASE(entry, StubRoutines::dexp());
 339   FUNCTION_CASE(entry, StubRoutines::dlog());
 340   FUNCTION_CASE(entry, StubRoutines::dlog10());
 341   FUNCTION_CASE(entry, StubRoutines::dpow());
 342   FUNCTION_CASE(entry, StubRoutines::dsin());
 343   FUNCTION_CASE(entry, StubRoutines::dcos());
 344   FUNCTION_CASE(entry, StubRoutines::dtan());
 345   FUNCTION_CASE(entry, StubRoutines::dtanh());
 346 
 347 #undef FUNCTION_CASE
 348 
 349   // Soft float adds more runtime names.
 350   return pd_name_for_address(entry);
 351 }
 352 
 353 
 354 JRT_ENTRY(void, Runtime1::new_instance(JavaThread* current, Klass* klass))
 355 #ifndef PRODUCT
 356   if (PrintC1Statistics) {
 357     _new_instance_slowcase_cnt++;
 358   }
 359 #endif
 360   assert(klass->is_klass(), "not a class");
 361   Handle holder(current, klass->klass_holder()); // keep the klass alive
 362   InstanceKlass* h = InstanceKlass::cast(klass);
 363   h->check_valid_for_instantiation(true, CHECK);
 364   // make sure klass is initialized
 365   h->initialize(CHECK);
 366   // allocate instance and return via TLS
 367   oop obj = h->allocate_instance(CHECK);






 368   current->set_vm_result(obj);
 369 JRT_END
 370 



 371 
 372 JRT_ENTRY(void, Runtime1::new_type_array(JavaThread* current, Klass* klass, jint length))
 373 #ifndef PRODUCT
 374   if (PrintC1Statistics) {
 375     _new_type_array_slowcase_cnt++;
 376   }
 377 #endif
 378   // Note: no handle for klass needed since they are not used
 379   //       anymore after new_typeArray() and no GC can happen before.
 380   //       (This may have to change if this code changes!)
 381   assert(klass->is_klass(), "not a class");
 382   BasicType elt_type = TypeArrayKlass::cast(klass)->element_type();
 383   oop obj = oopFactory::new_typeArray(elt_type, length, CHECK);
 384   current->set_vm_result(obj);
 385   // This is pretty rare but this runtime patch is stressful to deoptimization
 386   // if we deoptimize here so force a deopt to stress the path.
 387   if (DeoptimizeALot) {
 388     deopt_caller(current);
 389   }
 390 
 391 JRT_END
 392 
 393 
 394 JRT_ENTRY(void, Runtime1::new_object_array(JavaThread* current, Klass* array_klass, jint length))
 395 #ifndef PRODUCT
 396   if (PrintC1Statistics) {
 397     _new_object_array_slowcase_cnt++;
 398   }
 399 #endif
 400   // Note: no handle for klass needed since they are not used
 401   //       anymore after new_objArray() and no GC can happen before.
 402   //       (This may have to change if this code changes!)
 403   assert(array_klass->is_klass(), "not a class");
 404   Handle holder(current, array_klass->klass_holder()); // keep the klass alive
 405   Klass* elem_klass = ObjArrayKlass::cast(array_klass)->element_klass();
 406   objArrayOop obj = oopFactory::new_objArray(elem_klass, length, CHECK);
 407   current->set_vm_result(obj);
 408   // This is pretty rare but this runtime patch is stressful to deoptimization
 409   // if we deoptimize here so force a deopt to stress the path.
 410   if (DeoptimizeALot) {
 411     deopt_caller(current);
 412   }
 413 JRT_END
 414 
 415 





























 416 JRT_ENTRY(void, Runtime1::new_multi_array(JavaThread* current, Klass* klass, int rank, jint* dims))
 417 #ifndef PRODUCT
 418   if (PrintC1Statistics) {
 419     _new_multi_array_slowcase_cnt++;
 420   }
 421 #endif
 422   assert(klass->is_klass(), "not a class");
 423   assert(rank >= 1, "rank must be nonzero");
 424   Handle holder(current, klass->klass_holder()); // keep the klass alive
 425   oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK);
 426   current->set_vm_result(obj);
 427 JRT_END
 428 
 429 




























































































 430 JRT_ENTRY(void, Runtime1::unimplemented_entry(JavaThread* current, C1StubId id))
 431   tty->print_cr("Runtime1::entry_for(%d) returned unimplemented entry point", (int)id);
 432 JRT_END
 433 
 434 
 435 JRT_ENTRY(void, Runtime1::throw_array_store_exception(JavaThread* current, oopDesc* obj))
 436   ResourceMark rm(current);
 437   const char* klass_name = obj->klass()->external_name();
 438   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ArrayStoreException(), klass_name);
 439 JRT_END
 440 
 441 
 442 // counter_overflow() is called from within C1-compiled methods. The enclosing method is the method
 443 // associated with the top activation record. The inlinee (that is possibly included in the enclosing
 444 // method) method is passed as an argument. In order to do that it is embedded in the code as
 445 // a constant.
 446 static nmethod* counter_overflow_helper(JavaThread* current, int branch_bci, Method* m) {
 447   nmethod* osr_nm = nullptr;
 448   methodHandle method(current, m);
 449 

 733     _throw_class_cast_exception_count++;
 734   }
 735 #endif
 736   ResourceMark rm(current);
 737   char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
 738   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ClassCastException(), message);
 739 JRT_END
 740 
 741 
 742 JRT_ENTRY(void, Runtime1::throw_incompatible_class_change_error(JavaThread* current))
 743 #ifndef PRODUCT
 744   if (PrintC1Statistics) {
 745     _throw_incompatible_class_change_error_count++;
 746   }
 747 #endif
 748   ResourceMark rm(current);
 749   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IncompatibleClassChangeError());
 750 JRT_END
 751 
 752 













 753 JRT_BLOCK_ENTRY(void, Runtime1::monitorenter(JavaThread* current, oopDesc* obj, BasicObjectLock* lock))
 754 #ifndef PRODUCT
 755   if (PrintC1Statistics) {
 756     _monitorenter_slowcase_cnt++;
 757   }
 758 #endif
 759   if (LockingMode == LM_MONITOR) {
 760     lock->set_obj(obj);
 761   }
 762   assert(obj == lock->obj(), "must match");
 763   SharedRuntime::monitor_enter_helper(obj, lock->lock(), current);
 764 JRT_END
 765 
 766 
 767 JRT_LEAF(void, Runtime1::monitorexit(JavaThread* current, BasicObjectLock* lock))
 768   assert(current == JavaThread::current(), "pre-condition");
 769 #ifndef PRODUCT
 770   if (PrintC1Statistics) {
 771     _monitorexit_slowcase_cnt++;
 772   }

 938                       RegisterMap::WalkContinuation::skip);
 939   frame runtime_frame = current->last_frame();
 940   frame caller_frame = runtime_frame.sender(&reg_map);
 941 
 942   // last java frame on stack
 943   vframeStream vfst(current, true);
 944   assert(!vfst.at_end(), "Java frame must exist");
 945 
 946   methodHandle caller_method(current, vfst.method());
 947   // Note that caller_method->code() may not be same as caller_code because of OSR's
 948   // Note also that in the presence of inlining it is not guaranteed
 949   // that caller_method() == caller_code->method()
 950 
 951   int bci = vfst.bci();
 952   Bytecodes::Code code = caller_method()->java_code_at(bci);
 953 
 954   // this is used by assertions in the access_field_patching_id
 955   BasicType patch_field_type = T_ILLEGAL;
 956   bool deoptimize_for_volatile = false;
 957   bool deoptimize_for_atomic = false;


 958   int patch_field_offset = -1;
 959   Klass* init_klass = nullptr; // klass needed by load_klass_patching code
 960   Klass* load_klass = nullptr; // klass needed by load_klass_patching code
 961   Handle mirror(current, nullptr); // oop needed by load_mirror_patching code
 962   Handle appendix(current, nullptr); // oop needed by appendix_patching code
 963   bool load_klass_or_mirror_patch_id =
 964     (stub_id == C1StubId::load_klass_patching_id || stub_id == C1StubId::load_mirror_patching_id);
 965 
 966   if (stub_id == C1StubId::access_field_patching_id) {
 967 
 968     Bytecode_field field_access(caller_method, bci);
 969     fieldDescriptor result; // initialize class if needed
 970     Bytecodes::Code code = field_access.code();
 971     constantPoolHandle constants(current, caller_method->constants());
 972     LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK);
 973     patch_field_offset = result.offset();
 974 
 975     // If we're patching a field which is volatile then at compile it
 976     // must not have been know to be volatile, so the generated code
 977     // isn't correct for a volatile reference.  The nmethod has to be

 981     // used for patching references to oops which don't need special
 982     // handling in the volatile case.
 983 
 984     deoptimize_for_volatile = result.access_flags().is_volatile();
 985 
 986     // If we are patching a field which should be atomic, then
 987     // the generated code is not correct either, force deoptimizing.
 988     // We need to only cover T_LONG and T_DOUBLE fields, as we can
 989     // break access atomicity only for them.
 990 
 991     // Strictly speaking, the deoptimization on 64-bit platforms
 992     // is unnecessary, and T_LONG stores on 32-bit platforms need
 993     // to be handled by special patching code when AlwaysAtomicAccesses
 994     // becomes product feature. At this point, we are still going
 995     // for the deoptimization for consistency against volatile
 996     // accesses.
 997 
 998     patch_field_type = result.field_type();
 999     deoptimize_for_atomic = (AlwaysAtomicAccesses && (patch_field_type == T_DOUBLE || patch_field_type == T_LONG));
1000 










1001   } else if (load_klass_or_mirror_patch_id) {
1002     Klass* k = nullptr;
1003     switch (code) {
1004       case Bytecodes::_putstatic:
1005       case Bytecodes::_getstatic:
1006         { Klass* klass = resolve_field_return_klass(caller_method, bci, CHECK);
1007           init_klass = klass;
1008           mirror = Handle(current, klass->java_mirror());
1009         }
1010         break;
1011       case Bytecodes::_new:
1012         { Bytecode_new bnew(caller_method(), caller_method->bcp_from(bci));
1013           k = caller_method->constants()->klass_at(bnew.index(), CHECK);
1014         }
1015         break;
1016       case Bytecodes::_multianewarray:
1017         { Bytecode_multianewarray mna(caller_method(), caller_method->bcp_from(bci));
1018           k = caller_method->constants()->klass_at(mna.index(), CHECK);
1019         }
1020         break;

1053     CallInfo info;
1054     constantPoolHandle pool(current, caller_method->constants());
1055     int index = bytecode.index();
1056     LinkResolver::resolve_invoke(info, Handle(), pool, index, bc, CHECK);
1057     switch (bc) {
1058       case Bytecodes::_invokehandle: {
1059         ResolvedMethodEntry* entry = pool->cache()->set_method_handle(index, info);
1060         appendix = Handle(current, pool->cache()->appendix_if_resolved(entry));
1061         break;
1062       }
1063       case Bytecodes::_invokedynamic: {
1064         appendix = Handle(current, pool->cache()->set_dynamic_call(info, index));
1065         break;
1066       }
1067       default: fatal("unexpected bytecode for load_appendix_patching_id");
1068     }
1069   } else {
1070     ShouldNotReachHere();
1071   }
1072 
1073   if (deoptimize_for_volatile || deoptimize_for_atomic) {
1074     // At compile time we assumed the field wasn't volatile/atomic but after
1075     // loading it turns out it was volatile/atomic so we have to throw the
1076     // compiled code out and let it be regenerated.
1077     if (TracePatching) {
1078       if (deoptimize_for_volatile) {
1079         tty->print_cr("Deoptimizing for patching volatile field reference");
1080       }
1081       if (deoptimize_for_atomic) {
1082         tty->print_cr("Deoptimizing for patching atomic field reference");
1083       }






1084     }
1085 
1086     // It's possible the nmethod was invalidated in the last
1087     // safepoint, but if it's still alive then make it not_entrant.
1088     nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
1089     if (nm != nullptr) {
1090       nm->make_not_entrant();
1091     }
1092 
1093     Deoptimization::deoptimize_frame(current, caller_frame.id());
1094 
1095     // Return to the now deoptimized frame.
1096   }
1097 
1098   // Now copy code back
1099 
1100   {
1101     MutexLocker ml_code (current, CodeCache_lock, Mutex::_no_safepoint_check_flag);
1102     //
1103     // Deoptimization may have happened while we waited for the lock.

1514 #ifndef PRODUCT
1515 void Runtime1::print_statistics() {
1516   tty->print_cr("C1 Runtime statistics:");
1517   tty->print_cr(" _resolve_invoke_virtual_cnt:     %u", SharedRuntime::_resolve_virtual_ctr);
1518   tty->print_cr(" _resolve_invoke_opt_virtual_cnt: %u", SharedRuntime::_resolve_opt_virtual_ctr);
1519   tty->print_cr(" _resolve_invoke_static_cnt:      %u", SharedRuntime::_resolve_static_ctr);
1520   tty->print_cr(" _handle_wrong_method_cnt:        %u", SharedRuntime::_wrong_method_ctr);
1521   tty->print_cr(" _ic_miss_cnt:                    %u", SharedRuntime::_ic_miss_ctr);
1522   tty->print_cr(" _generic_arraycopystub_cnt:      %u", _generic_arraycopystub_cnt);
1523   tty->print_cr(" _byte_arraycopy_cnt:             %u", _byte_arraycopy_stub_cnt);
1524   tty->print_cr(" _short_arraycopy_cnt:            %u", _short_arraycopy_stub_cnt);
1525   tty->print_cr(" _int_arraycopy_cnt:              %u", _int_arraycopy_stub_cnt);
1526   tty->print_cr(" _long_arraycopy_cnt:             %u", _long_arraycopy_stub_cnt);
1527   tty->print_cr(" _oop_arraycopy_cnt:              %u", _oop_arraycopy_stub_cnt);
1528   tty->print_cr(" _arraycopy_slowcase_cnt:         %u", _arraycopy_slowcase_cnt);
1529   tty->print_cr(" _arraycopy_checkcast_cnt:        %u", _arraycopy_checkcast_cnt);
1530   tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%u", _arraycopy_checkcast_attempt_cnt);
1531 
1532   tty->print_cr(" _new_type_array_slowcase_cnt:    %u", _new_type_array_slowcase_cnt);
1533   tty->print_cr(" _new_object_array_slowcase_cnt:  %u", _new_object_array_slowcase_cnt);

1534   tty->print_cr(" _new_instance_slowcase_cnt:      %u", _new_instance_slowcase_cnt);
1535   tty->print_cr(" _new_multi_array_slowcase_cnt:   %u", _new_multi_array_slowcase_cnt);






1536   tty->print_cr(" _monitorenter_slowcase_cnt:      %u", _monitorenter_slowcase_cnt);
1537   tty->print_cr(" _monitorexit_slowcase_cnt:       %u", _monitorexit_slowcase_cnt);
1538   tty->print_cr(" _patch_code_slowcase_cnt:        %u", _patch_code_slowcase_cnt);
1539 
1540   tty->print_cr(" _throw_range_check_exception_count:            %u:", _throw_range_check_exception_count);
1541   tty->print_cr(" _throw_index_exception_count:                  %u:", _throw_index_exception_count);
1542   tty->print_cr(" _throw_div0_exception_count:                   %u:", _throw_div0_exception_count);
1543   tty->print_cr(" _throw_null_pointer_exception_count:           %u:", _throw_null_pointer_exception_count);
1544   tty->print_cr(" _throw_class_cast_exception_count:             %u:", _throw_class_cast_exception_count);
1545   tty->print_cr(" _throw_incompatible_class_change_error_count:  %u:", _throw_incompatible_class_change_error_count);


1546   tty->print_cr(" _throw_count:                                  %u:", _throw_count);
1547 
1548   SharedRuntime::print_ic_miss_histogram();
1549   tty->cr();
1550 }
1551 #endif // PRODUCT

  32 #include "classfile/vmClasses.hpp"
  33 #include "classfile/vmSymbols.hpp"
  34 #include "code/codeBlob.hpp"
  35 #include "code/compiledIC.hpp"
  36 #include "code/scopeDesc.hpp"
  37 #include "code/vtableStubs.hpp"
  38 #include "compiler/compilationPolicy.hpp"
  39 #include "compiler/disassembler.hpp"
  40 #include "compiler/oopMap.hpp"
  41 #include "gc/shared/barrierSet.hpp"
  42 #include "gc/shared/c1/barrierSetC1.hpp"
  43 #include "gc/shared/collectedHeap.hpp"
  44 #include "interpreter/bytecode.hpp"
  45 #include "interpreter/interpreter.hpp"
  46 #include "jfr/support/jfrIntrinsics.hpp"
  47 #include "logging/log.hpp"
  48 #include "memory/oopFactory.hpp"
  49 #include "memory/resourceArea.hpp"
  50 #include "memory/universe.hpp"
  51 #include "oops/access.inline.hpp"
  52 #include "oops/flatArrayKlass.hpp"
  53 #include "oops/flatArrayOop.inline.hpp"
  54 #include "oops/objArrayOop.inline.hpp"
  55 #include "oops/objArrayKlass.hpp"
  56 #include "oops/oop.inline.hpp"
  57 #include "prims/jvmtiExport.hpp"
  58 #include "runtime/atomic.hpp"
  59 #include "runtime/fieldDescriptor.inline.hpp"
  60 #include "runtime/frame.inline.hpp"
  61 #include "runtime/handles.inline.hpp"
  62 #include "runtime/interfaceSupport.inline.hpp"
  63 #include "runtime/javaCalls.hpp"
  64 #include "runtime/sharedRuntime.hpp"
  65 #include "runtime/stackWatermarkSet.hpp"
  66 #include "runtime/stubRoutines.hpp"
  67 #include "runtime/vframe.inline.hpp"
  68 #include "runtime/vframeArray.hpp"
  69 #include "runtime/vm_version.hpp"
  70 #include "utilities/copy.hpp"
  71 #include "utilities/events.hpp"
  72 
  73 

 104 }
 105 
 106 // Implementation of Runtime1
 107 
 108 CodeBlob* Runtime1::_blobs[(int)C1StubId::NUM_STUBIDS];
 109 
 110 #define C1_BLOB_NAME_DEFINE(name)  "C1 Runtime " # name "_blob",
 111 const char *Runtime1::_blob_names[] = {
 112   C1_STUBS_DO(C1_BLOB_NAME_DEFINE)
 113 };
 114 #undef C1_STUB_NAME_DEFINE
 115 
 116 #ifndef PRODUCT
 117 // statistics
 118 uint Runtime1::_generic_arraycopystub_cnt = 0;
 119 uint Runtime1::_arraycopy_slowcase_cnt = 0;
 120 uint Runtime1::_arraycopy_checkcast_cnt = 0;
 121 uint Runtime1::_arraycopy_checkcast_attempt_cnt = 0;
 122 uint Runtime1::_new_type_array_slowcase_cnt = 0;
 123 uint Runtime1::_new_object_array_slowcase_cnt = 0;
 124 uint Runtime1::_new_null_free_array_slowcase_cnt = 0;
 125 uint Runtime1::_new_instance_slowcase_cnt = 0;
 126 uint Runtime1::_new_multi_array_slowcase_cnt = 0;
 127 uint Runtime1::_load_flat_array_slowcase_cnt = 0;
 128 uint Runtime1::_store_flat_array_slowcase_cnt = 0;
 129 uint Runtime1::_substitutability_check_slowcase_cnt = 0;
 130 uint Runtime1::_buffer_inline_args_slowcase_cnt = 0;
 131 uint Runtime1::_buffer_inline_args_no_receiver_slowcase_cnt = 0;
 132 uint Runtime1::_monitorenter_slowcase_cnt = 0;
 133 uint Runtime1::_monitorexit_slowcase_cnt = 0;
 134 uint Runtime1::_patch_code_slowcase_cnt = 0;
 135 uint Runtime1::_throw_range_check_exception_count = 0;
 136 uint Runtime1::_throw_index_exception_count = 0;
 137 uint Runtime1::_throw_div0_exception_count = 0;
 138 uint Runtime1::_throw_null_pointer_exception_count = 0;
 139 uint Runtime1::_throw_class_cast_exception_count = 0;
 140 uint Runtime1::_throw_incompatible_class_change_error_count = 0;
 141 uint Runtime1::_throw_illegal_monitor_state_exception_count = 0;
 142 uint Runtime1::_throw_identity_exception_count = 0;
 143 uint Runtime1::_throw_count = 0;
 144 
 145 static uint _byte_arraycopy_stub_cnt = 0;
 146 static uint _short_arraycopy_stub_cnt = 0;
 147 static uint _int_arraycopy_stub_cnt = 0;
 148 static uint _long_arraycopy_stub_cnt = 0;
 149 static uint _oop_arraycopy_stub_cnt = 0;
 150 
 151 address Runtime1::arraycopy_count_address(BasicType type) {
 152   switch (type) {
 153   case T_BOOLEAN:
 154   case T_BYTE:   return (address)&_byte_arraycopy_stub_cnt;
 155   case T_CHAR:
 156   case T_SHORT:  return (address)&_short_arraycopy_stub_cnt;
 157   case T_FLOAT:
 158   case T_INT:    return (address)&_int_arraycopy_stub_cnt;
 159   case T_DOUBLE:
 160   case T_LONG:   return (address)&_long_arraycopy_stub_cnt;
 161   case T_ARRAY:
 162   case T_OBJECT: return (address)&_oop_arraycopy_stub_cnt;

 343   FUNCTION_CASE(entry, JfrTime::time_function());
 344 #endif
 345   FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32());
 346   FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32C());
 347   FUNCTION_CASE(entry, StubRoutines::vectorizedMismatch());
 348   FUNCTION_CASE(entry, StubRoutines::dexp());
 349   FUNCTION_CASE(entry, StubRoutines::dlog());
 350   FUNCTION_CASE(entry, StubRoutines::dlog10());
 351   FUNCTION_CASE(entry, StubRoutines::dpow());
 352   FUNCTION_CASE(entry, StubRoutines::dsin());
 353   FUNCTION_CASE(entry, StubRoutines::dcos());
 354   FUNCTION_CASE(entry, StubRoutines::dtan());
 355   FUNCTION_CASE(entry, StubRoutines::dtanh());
 356 
 357 #undef FUNCTION_CASE
 358 
 359   // Soft float adds more runtime names.
 360   return pd_name_for_address(entry);
 361 }
 362 
 363 static void allocate_instance(JavaThread* current, Klass* klass, TRAPS) {

 364 #ifndef PRODUCT
 365   if (PrintC1Statistics) {
 366     Runtime1::_new_instance_slowcase_cnt++;
 367   }
 368 #endif
 369   assert(klass->is_klass(), "not a class");
 370   Handle holder(current, klass->klass_holder()); // keep the klass alive
 371   InstanceKlass* h = InstanceKlass::cast(klass);
 372   h->check_valid_for_instantiation(true, CHECK);
 373   // make sure klass is initialized
 374   h->initialize(CHECK);
 375   oop obj = nullptr;
 376   if (h->is_inline_klass() && InlineKlass::cast(h)->is_empty_inline_type()) {
 377     obj = InlineKlass::cast(h)->default_value();
 378     assert(obj != nullptr, "default value must exist");
 379   } else {
 380     // allocate instance and return via TLS
 381     obj = h->allocate_instance(CHECK);
 382   }
 383   current->set_vm_result(obj);
 384 JRT_END
 385 
 386 JRT_ENTRY(void, Runtime1::new_instance(JavaThread* current, Klass* klass))
 387   allocate_instance(current, klass, CHECK);
 388 JRT_END
 389 
 390 JRT_ENTRY(void, Runtime1::new_type_array(JavaThread* current, Klass* klass, jint length))
 391 #ifndef PRODUCT
 392   if (PrintC1Statistics) {
 393     _new_type_array_slowcase_cnt++;
 394   }
 395 #endif
 396   // Note: no handle for klass needed since they are not used
 397   //       anymore after new_typeArray() and no GC can happen before.
 398   //       (This may have to change if this code changes!)
 399   assert(klass->is_klass(), "not a class");
 400   BasicType elt_type = TypeArrayKlass::cast(klass)->element_type();
 401   oop obj = oopFactory::new_typeArray(elt_type, length, CHECK);
 402   current->set_vm_result(obj);
 403   // This is pretty rare but this runtime patch is stressful to deoptimization
 404   // if we deoptimize here so force a deopt to stress the path.
 405   if (DeoptimizeALot) {
 406     deopt_caller(current);
 407   }
 408 
 409 JRT_END
 410 
 411 
 412 JRT_ENTRY(void, Runtime1::new_object_array(JavaThread* current, Klass* array_klass, jint length))
 413 #ifndef PRODUCT
 414   if (PrintC1Statistics) {
 415     _new_object_array_slowcase_cnt++;
 416   }
 417 #endif
 418   // Note: no handle for klass needed since they are not used
 419   //       anymore after new_objArray() and no GC can happen before.
 420   //       (This may have to change if this code changes!)
 421   assert(array_klass->is_klass(), "not a class");
 422   Handle holder(current, array_klass->klass_holder()); // keep the klass alive
 423   Klass* elem_klass = ArrayKlass::cast(array_klass)->element_klass();
 424   objArrayOop obj = oopFactory::new_objArray(elem_klass, length, CHECK);
 425   current->set_vm_result(obj);
 426   // This is pretty rare but this runtime patch is stressful to deoptimization
 427   // if we deoptimize here so force a deopt to stress the path.
 428   if (DeoptimizeALot) {
 429     deopt_caller(current);
 430   }
 431 JRT_END
 432 
 433 
 434 JRT_ENTRY(void, Runtime1::new_null_free_array(JavaThread* current, Klass* array_klass, jint length))
 435   NOT_PRODUCT(_new_null_free_array_slowcase_cnt++;)
 436 
 437   // Note: no handle for klass needed since they are not used
 438   //       anymore after new_objArray() and no GC can happen before.
 439   //       (This may have to change if this code changes!)
 440   assert(array_klass->is_klass(), "not a class");
 441   Handle holder(THREAD, array_klass->klass_holder()); // keep the klass alive
 442   Klass* elem_klass = ArrayKlass::cast(array_klass)->element_klass();
 443   assert(elem_klass->is_inline_klass(), "must be");
 444   InlineKlass* vk = InlineKlass::cast(elem_klass);
 445   // Logically creates elements, ensure klass init
 446   elem_klass->initialize(CHECK);
 447   arrayOop obj= nullptr;
 448   //  Limitation here, only non-atomic layouts are supported
 449   if (UseArrayFlattening && vk->has_non_atomic_layout()) {
 450     obj = oopFactory::new_flatArray(elem_klass, length, LayoutKind::NON_ATOMIC_FLAT, CHECK);
 451   } else {
 452     obj = oopFactory::new_null_free_objArray(elem_klass, length, CHECK);
 453   }
 454   current->set_vm_result(obj);
 455   // This is pretty rare but this runtime patch is stressful to deoptimization
 456   // if we deoptimize here so force a deopt to stress the path.
 457   if (DeoptimizeALot) {
 458     deopt_caller(current);
 459   }
 460 JRT_END
 461 
 462 
 463 JRT_ENTRY(void, Runtime1::new_multi_array(JavaThread* current, Klass* klass, int rank, jint* dims))
 464 #ifndef PRODUCT
 465   if (PrintC1Statistics) {
 466     _new_multi_array_slowcase_cnt++;
 467   }
 468 #endif
 469   assert(klass->is_klass(), "not a class");
 470   assert(rank >= 1, "rank must be nonzero");
 471   Handle holder(current, klass->klass_holder()); // keep the klass alive
 472   oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK);
 473   current->set_vm_result(obj);
 474 JRT_END
 475 
 476 
 477 static void profile_flat_array(JavaThread* current, bool load) {
 478   ResourceMark rm(current);
 479   vframeStream vfst(current, true);
 480   assert(!vfst.at_end(), "Java frame must exist");
 481   // Check if array access profiling is enabled
 482   if (vfst.nm()->comp_level() != CompLevel_full_profile || !C1UpdateMethodData) {
 483     return;
 484   }
 485   int bci = vfst.bci();
 486   Method* method = vfst.method();
 487   MethodData* md = method->method_data();
 488   if (md != nullptr) {
 489     // Lock to access ProfileData, and ensure lock is not broken by a safepoint
 490     MutexLocker ml(md->extra_data_lock(), Mutex::_no_safepoint_check_flag);
 491 
 492     ProfileData* data = md->bci_to_data(bci);
 493     assert(data != nullptr, "incorrect profiling entry");
 494     if (data->is_ArrayLoadData()) {
 495       assert(load, "should be an array load");
 496       ArrayLoadData* load_data = (ArrayLoadData*) data;
 497       load_data->set_flat_array();
 498     } else {
 499       assert(data->is_ArrayStoreData(), "");
 500       assert(!load, "should be an array store");
 501       ArrayStoreData* store_data = (ArrayStoreData*) data;
 502       store_data->set_flat_array();
 503     }
 504   }
 505 }
 506 
 507 JRT_ENTRY(void, Runtime1::load_flat_array(JavaThread* current, flatArrayOopDesc* array, int index))
 508   assert(array->klass()->is_flatArray_klass(), "should not be called");
 509   profile_flat_array(current, true);
 510 
 511   NOT_PRODUCT(_load_flat_array_slowcase_cnt++;)
 512   assert(array->length() > 0 && index < array->length(), "already checked");
 513   flatArrayHandle vah(current, array);
 514   oop obj = array->read_value_from_flat_array(index, CHECK);
 515   current->set_vm_result(obj);
 516 JRT_END
 517 
 518 
 519 JRT_ENTRY(void, Runtime1::store_flat_array(JavaThread* current, flatArrayOopDesc* array, int index, oopDesc* value))
 520   if (array->klass()->is_flatArray_klass()) {
 521     profile_flat_array(current, false);
 522   }
 523 
 524   NOT_PRODUCT(_store_flat_array_slowcase_cnt++;)
 525   if (value == nullptr) {
 526     assert(array->klass()->is_flatArray_klass() || array->klass()->is_null_free_array_klass(), "should not be called");
 527     SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_NullPointerException());
 528   } else {
 529     assert(array->klass()->is_flatArray_klass(), "should not be called");
 530     array->write_value_to_flat_array(value, index, CHECK);
 531   }
 532 JRT_END
 533 
 534 
 535 JRT_ENTRY(int, Runtime1::substitutability_check(JavaThread* current, oopDesc* left, oopDesc* right))
 536   NOT_PRODUCT(_substitutability_check_slowcase_cnt++;)
 537   JavaCallArguments args;
 538   args.push_oop(Handle(THREAD, left));
 539   args.push_oop(Handle(THREAD, right));
 540   JavaValue result(T_BOOLEAN);
 541   JavaCalls::call_static(&result,
 542                          vmClasses::ValueObjectMethods_klass(),
 543                          vmSymbols::isSubstitutable_name(),
 544                          vmSymbols::object_object_boolean_signature(),
 545                          &args, CHECK_0);
 546   return result.get_jboolean() ? 1 : 0;
 547 JRT_END
 548 
 549 
 550 extern "C" void ps();
 551 
 552 void Runtime1::buffer_inline_args_impl(JavaThread* current, Method* m, bool allocate_receiver) {
 553   JavaThread* THREAD = current;
 554   methodHandle method(current, m); // We are inside the verified_entry or verified_inline_ro_entry of this method.
 555   oop obj = SharedRuntime::allocate_inline_types_impl(current, method, allocate_receiver, CHECK);
 556   current->set_vm_result(obj);
 557 }
 558 
 559 JRT_ENTRY(void, Runtime1::buffer_inline_args(JavaThread* current, Method* method))
 560   NOT_PRODUCT(_buffer_inline_args_slowcase_cnt++;)
 561   buffer_inline_args_impl(current, method, true);
 562 JRT_END
 563 
 564 JRT_ENTRY(void, Runtime1::buffer_inline_args_no_receiver(JavaThread* current, Method* method))
 565   NOT_PRODUCT(_buffer_inline_args_no_receiver_slowcase_cnt++;)
 566   buffer_inline_args_impl(current, method, false);
 567 JRT_END
 568 
 569 JRT_ENTRY(void, Runtime1::unimplemented_entry(JavaThread* current, C1StubId id))
 570   tty->print_cr("Runtime1::entry_for(%d) returned unimplemented entry point", (int)id);
 571 JRT_END
 572 
 573 
 574 JRT_ENTRY(void, Runtime1::throw_array_store_exception(JavaThread* current, oopDesc* obj))
 575   ResourceMark rm(current);
 576   const char* klass_name = obj->klass()->external_name();
 577   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ArrayStoreException(), klass_name);
 578 JRT_END
 579 
 580 
 581 // counter_overflow() is called from within C1-compiled methods. The enclosing method is the method
 582 // associated with the top activation record. The inlinee (that is possibly included in the enclosing
 583 // method) method is passed as an argument. In order to do that it is embedded in the code as
 584 // a constant.
 585 static nmethod* counter_overflow_helper(JavaThread* current, int branch_bci, Method* m) {
 586   nmethod* osr_nm = nullptr;
 587   methodHandle method(current, m);
 588 

 872     _throw_class_cast_exception_count++;
 873   }
 874 #endif
 875   ResourceMark rm(current);
 876   char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
 877   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ClassCastException(), message);
 878 JRT_END
 879 
 880 
 881 JRT_ENTRY(void, Runtime1::throw_incompatible_class_change_error(JavaThread* current))
 882 #ifndef PRODUCT
 883   if (PrintC1Statistics) {
 884     _throw_incompatible_class_change_error_count++;
 885   }
 886 #endif
 887   ResourceMark rm(current);
 888   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IncompatibleClassChangeError());
 889 JRT_END
 890 
 891 
 892 JRT_ENTRY(void, Runtime1::throw_illegal_monitor_state_exception(JavaThread* current))
 893   NOT_PRODUCT(_throw_illegal_monitor_state_exception_count++;)
 894   ResourceMark rm(current);
 895   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IllegalMonitorStateException());
 896 JRT_END
 897 
 898 JRT_ENTRY(void, Runtime1::throw_identity_exception(JavaThread* current, oopDesc* object))
 899   NOT_PRODUCT(_throw_identity_exception_count++;)
 900   ResourceMark rm(current);
 901   char* message = SharedRuntime::generate_identity_exception_message(current, object->klass());
 902   SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IdentityException(), message);
 903 JRT_END
 904 
 905 JRT_BLOCK_ENTRY(void, Runtime1::monitorenter(JavaThread* current, oopDesc* obj, BasicObjectLock* lock))
 906 #ifndef PRODUCT
 907   if (PrintC1Statistics) {
 908     _monitorenter_slowcase_cnt++;
 909   }
 910 #endif
 911   if (LockingMode == LM_MONITOR) {
 912     lock->set_obj(obj);
 913   }
 914   assert(obj == lock->obj(), "must match");
 915   SharedRuntime::monitor_enter_helper(obj, lock->lock(), current);
 916 JRT_END
 917 
 918 
 919 JRT_LEAF(void, Runtime1::monitorexit(JavaThread* current, BasicObjectLock* lock))
 920   assert(current == JavaThread::current(), "pre-condition");
 921 #ifndef PRODUCT
 922   if (PrintC1Statistics) {
 923     _monitorexit_slowcase_cnt++;
 924   }

1090                       RegisterMap::WalkContinuation::skip);
1091   frame runtime_frame = current->last_frame();
1092   frame caller_frame = runtime_frame.sender(&reg_map);
1093 
1094   // last java frame on stack
1095   vframeStream vfst(current, true);
1096   assert(!vfst.at_end(), "Java frame must exist");
1097 
1098   methodHandle caller_method(current, vfst.method());
1099   // Note that caller_method->code() may not be same as caller_code because of OSR's
1100   // Note also that in the presence of inlining it is not guaranteed
1101   // that caller_method() == caller_code->method()
1102 
1103   int bci = vfst.bci();
1104   Bytecodes::Code code = caller_method()->java_code_at(bci);
1105 
1106   // this is used by assertions in the access_field_patching_id
1107   BasicType patch_field_type = T_ILLEGAL;
1108   bool deoptimize_for_volatile = false;
1109   bool deoptimize_for_atomic = false;
1110   bool deoptimize_for_null_free = false;
1111   bool deoptimize_for_flat = false;
1112   int patch_field_offset = -1;
1113   Klass* init_klass = nullptr; // klass needed by load_klass_patching code
1114   Klass* load_klass = nullptr; // klass needed by load_klass_patching code
1115   Handle mirror(current, nullptr); // oop needed by load_mirror_patching code
1116   Handle appendix(current, nullptr); // oop needed by appendix_patching code
1117   bool load_klass_or_mirror_patch_id =
1118     (stub_id == C1StubId::load_klass_patching_id || stub_id == C1StubId::load_mirror_patching_id);
1119 
1120   if (stub_id == C1StubId::access_field_patching_id) {
1121 
1122     Bytecode_field field_access(caller_method, bci);
1123     fieldDescriptor result; // initialize class if needed
1124     Bytecodes::Code code = field_access.code();
1125     constantPoolHandle constants(current, caller_method->constants());
1126     LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK);
1127     patch_field_offset = result.offset();
1128 
1129     // If we're patching a field which is volatile then at compile it
1130     // must not have been know to be volatile, so the generated code
1131     // isn't correct for a volatile reference.  The nmethod has to be

1135     // used for patching references to oops which don't need special
1136     // handling in the volatile case.
1137 
1138     deoptimize_for_volatile = result.access_flags().is_volatile();
1139 
1140     // If we are patching a field which should be atomic, then
1141     // the generated code is not correct either, force deoptimizing.
1142     // We need to only cover T_LONG and T_DOUBLE fields, as we can
1143     // break access atomicity only for them.
1144 
1145     // Strictly speaking, the deoptimization on 64-bit platforms
1146     // is unnecessary, and T_LONG stores on 32-bit platforms need
1147     // to be handled by special patching code when AlwaysAtomicAccesses
1148     // becomes product feature. At this point, we are still going
1149     // for the deoptimization for consistency against volatile
1150     // accesses.
1151 
1152     patch_field_type = result.field_type();
1153     deoptimize_for_atomic = (AlwaysAtomicAccesses && (patch_field_type == T_DOUBLE || patch_field_type == T_LONG));
1154 
1155     // The field we are patching is null-free. Deoptimize and regenerate
1156     // the compiled code if we patch a putfield/putstatic because it
1157     // does not contain the required null check.
1158     deoptimize_for_null_free = result.is_null_free_inline_type() && (field_access.is_putfield() || field_access.is_putstatic());
1159 
1160     // The field we are patching is flat. Deoptimize and regenerate
1161     // the compiled code which can't handle the layout of the flat
1162     // field because it was unknown at compile time.
1163     deoptimize_for_flat = result.is_flat();
1164 
1165   } else if (load_klass_or_mirror_patch_id) {
1166     Klass* k = nullptr;
1167     switch (code) {
1168       case Bytecodes::_putstatic:
1169       case Bytecodes::_getstatic:
1170         { Klass* klass = resolve_field_return_klass(caller_method, bci, CHECK);
1171           init_klass = klass;
1172           mirror = Handle(current, klass->java_mirror());
1173         }
1174         break;
1175       case Bytecodes::_new:
1176         { Bytecode_new bnew(caller_method(), caller_method->bcp_from(bci));
1177           k = caller_method->constants()->klass_at(bnew.index(), CHECK);
1178         }
1179         break;
1180       case Bytecodes::_multianewarray:
1181         { Bytecode_multianewarray mna(caller_method(), caller_method->bcp_from(bci));
1182           k = caller_method->constants()->klass_at(mna.index(), CHECK);
1183         }
1184         break;

1217     CallInfo info;
1218     constantPoolHandle pool(current, caller_method->constants());
1219     int index = bytecode.index();
1220     LinkResolver::resolve_invoke(info, Handle(), pool, index, bc, CHECK);
1221     switch (bc) {
1222       case Bytecodes::_invokehandle: {
1223         ResolvedMethodEntry* entry = pool->cache()->set_method_handle(index, info);
1224         appendix = Handle(current, pool->cache()->appendix_if_resolved(entry));
1225         break;
1226       }
1227       case Bytecodes::_invokedynamic: {
1228         appendix = Handle(current, pool->cache()->set_dynamic_call(info, index));
1229         break;
1230       }
1231       default: fatal("unexpected bytecode for load_appendix_patching_id");
1232     }
1233   } else {
1234     ShouldNotReachHere();
1235   }
1236 
1237   if (deoptimize_for_volatile || deoptimize_for_atomic || deoptimize_for_null_free || deoptimize_for_flat) {
1238     // At compile time we assumed the field wasn't volatile/atomic but after
1239     // loading it turns out it was volatile/atomic so we have to throw the
1240     // compiled code out and let it be regenerated.
1241     if (TracePatching) {
1242       if (deoptimize_for_volatile) {
1243         tty->print_cr("Deoptimizing for patching volatile field reference");
1244       }
1245       if (deoptimize_for_atomic) {
1246         tty->print_cr("Deoptimizing for patching atomic field reference");
1247       }
1248       if (deoptimize_for_null_free) {
1249         tty->print_cr("Deoptimizing for patching null-free field reference");
1250       }
1251       if (deoptimize_for_flat) {
1252         tty->print_cr("Deoptimizing for patching flat field reference");
1253       }
1254     }
1255 
1256     // It's possible the nmethod was invalidated in the last
1257     // safepoint, but if it's still alive then make it not_entrant.
1258     nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
1259     if (nm != nullptr) {
1260       nm->make_not_entrant();
1261     }
1262 
1263     Deoptimization::deoptimize_frame(current, caller_frame.id());
1264 
1265     // Return to the now deoptimized frame.
1266   }
1267 
1268   // Now copy code back
1269 
1270   {
1271     MutexLocker ml_code (current, CodeCache_lock, Mutex::_no_safepoint_check_flag);
1272     //
1273     // Deoptimization may have happened while we waited for the lock.

1684 #ifndef PRODUCT
1685 void Runtime1::print_statistics() {
1686   tty->print_cr("C1 Runtime statistics:");
1687   tty->print_cr(" _resolve_invoke_virtual_cnt:     %u", SharedRuntime::_resolve_virtual_ctr);
1688   tty->print_cr(" _resolve_invoke_opt_virtual_cnt: %u", SharedRuntime::_resolve_opt_virtual_ctr);
1689   tty->print_cr(" _resolve_invoke_static_cnt:      %u", SharedRuntime::_resolve_static_ctr);
1690   tty->print_cr(" _handle_wrong_method_cnt:        %u", SharedRuntime::_wrong_method_ctr);
1691   tty->print_cr(" _ic_miss_cnt:                    %u", SharedRuntime::_ic_miss_ctr);
1692   tty->print_cr(" _generic_arraycopystub_cnt:      %u", _generic_arraycopystub_cnt);
1693   tty->print_cr(" _byte_arraycopy_cnt:             %u", _byte_arraycopy_stub_cnt);
1694   tty->print_cr(" _short_arraycopy_cnt:            %u", _short_arraycopy_stub_cnt);
1695   tty->print_cr(" _int_arraycopy_cnt:              %u", _int_arraycopy_stub_cnt);
1696   tty->print_cr(" _long_arraycopy_cnt:             %u", _long_arraycopy_stub_cnt);
1697   tty->print_cr(" _oop_arraycopy_cnt:              %u", _oop_arraycopy_stub_cnt);
1698   tty->print_cr(" _arraycopy_slowcase_cnt:         %u", _arraycopy_slowcase_cnt);
1699   tty->print_cr(" _arraycopy_checkcast_cnt:        %u", _arraycopy_checkcast_cnt);
1700   tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%u", _arraycopy_checkcast_attempt_cnt);
1701 
1702   tty->print_cr(" _new_type_array_slowcase_cnt:    %u", _new_type_array_slowcase_cnt);
1703   tty->print_cr(" _new_object_array_slowcase_cnt:  %u", _new_object_array_slowcase_cnt);
1704   tty->print_cr(" _new_null_free_array_slowcase_cnt: %u", _new_null_free_array_slowcase_cnt);
1705   tty->print_cr(" _new_instance_slowcase_cnt:      %u", _new_instance_slowcase_cnt);
1706   tty->print_cr(" _new_multi_array_slowcase_cnt:   %u", _new_multi_array_slowcase_cnt);
1707   tty->print_cr(" _load_flat_array_slowcase_cnt:   %u", _load_flat_array_slowcase_cnt);
1708   tty->print_cr(" _store_flat_array_slowcase_cnt:  %u", _store_flat_array_slowcase_cnt);
1709   tty->print_cr(" _substitutability_check_slowcase_cnt: %u", _substitutability_check_slowcase_cnt);
1710   tty->print_cr(" _buffer_inline_args_slowcase_cnt:%u", _buffer_inline_args_slowcase_cnt);
1711   tty->print_cr(" _buffer_inline_args_no_receiver_slowcase_cnt:%u", _buffer_inline_args_no_receiver_slowcase_cnt);
1712 
1713   tty->print_cr(" _monitorenter_slowcase_cnt:      %u", _monitorenter_slowcase_cnt);
1714   tty->print_cr(" _monitorexit_slowcase_cnt:       %u", _monitorexit_slowcase_cnt);
1715   tty->print_cr(" _patch_code_slowcase_cnt:        %u", _patch_code_slowcase_cnt);
1716 
1717   tty->print_cr(" _throw_range_check_exception_count:            %u:", _throw_range_check_exception_count);
1718   tty->print_cr(" _throw_index_exception_count:                  %u:", _throw_index_exception_count);
1719   tty->print_cr(" _throw_div0_exception_count:                   %u:", _throw_div0_exception_count);
1720   tty->print_cr(" _throw_null_pointer_exception_count:           %u:", _throw_null_pointer_exception_count);
1721   tty->print_cr(" _throw_class_cast_exception_count:             %u:", _throw_class_cast_exception_count);
1722   tty->print_cr(" _throw_incompatible_class_change_error_count:  %u:", _throw_incompatible_class_change_error_count);
1723   tty->print_cr(" _throw_illegal_monitor_state_exception_count:  %u:", _throw_illegal_monitor_state_exception_count);
1724   tty->print_cr(" _throw_identity_exception_count:               %u:", _throw_identity_exception_count);
1725   tty->print_cr(" _throw_count:                                  %u:", _throw_count);
1726 
1727   SharedRuntime::print_ic_miss_histogram();
1728   tty->cr();
1729 }
1730 #endif // PRODUCT
< prev index next >