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(®_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 // TODO 8350865 This is dead code since 8325660 because null-free arrays can only be created via the factory methods that are not yet implemented in C1. Should probably be fixed by 8265122.
437
438 // Note: no handle for klass needed since they are not used
439 // anymore after new_objArray() and no GC can happen before.
440 // (This may have to change if this code changes!)
441 assert(array_klass->is_klass(), "not a class");
442 Handle holder(THREAD, array_klass->klass_holder()); // keep the klass alive
443 Klass* elem_klass = ArrayKlass::cast(array_klass)->element_klass();
444 assert(elem_klass->is_inline_klass(), "must be");
445 InlineKlass* vk = InlineKlass::cast(elem_klass);
446 // Logically creates elements, ensure klass init
447 elem_klass->initialize(CHECK);
448 arrayOop obj= nullptr;
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, bool null_free) {
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 if (null_free) {
499 load_data->set_null_free_array();
500 }
501 } else {
502 assert(data->is_ArrayStoreData(), "");
503 assert(!load, "should be an array store");
504 ArrayStoreData* store_data = (ArrayStoreData*) data;
505 store_data->set_flat_array();
506 if (null_free) {
507 store_data->set_null_free_array();
508 }
509 }
510 }
511 }
512
513 JRT_ENTRY(void, Runtime1::load_flat_array(JavaThread* current, flatArrayOopDesc* array, int index))
514 assert(array->klass()->is_flatArray_klass(), "should not be called");
515 profile_flat_array(current, true, array->is_null_free_array());
516
517 NOT_PRODUCT(_load_flat_array_slowcase_cnt++;)
518 assert(array->length() > 0 && index < array->length(), "already checked");
519 flatArrayHandle vah(current, array);
520 oop obj = array->read_value_from_flat_array(index, CHECK);
521 current->set_vm_result(obj);
522 JRT_END
523
524 JRT_ENTRY(void, Runtime1::store_flat_array(JavaThread* current, flatArrayOopDesc* array, int index, oopDesc* value))
525 // TOOD 8350865 We can call here with a non-flat array because of LIR_Assembler::emit_opFlattenedArrayCheck
526 if (array->klass()->is_flatArray_klass()) {
527 profile_flat_array(current, false, array->is_null_free_array());
528 }
529
530 NOT_PRODUCT(_store_flat_array_slowcase_cnt++;)
531 if (value == nullptr && array->is_null_free_array()) {
532 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_NullPointerException());
533 } else {
534 assert(array->klass()->is_flatArray_klass(), "should not be called");
535 array->write_value_to_flat_array(value, index, CHECK);
536 }
537 JRT_END
538
539 JRT_ENTRY(int, Runtime1::substitutability_check(JavaThread* current, oopDesc* left, oopDesc* right))
540 NOT_PRODUCT(_substitutability_check_slowcase_cnt++;)
541 JavaCallArguments args;
542 args.push_oop(Handle(THREAD, left));
543 args.push_oop(Handle(THREAD, right));
544 JavaValue result(T_BOOLEAN);
545 JavaCalls::call_static(&result,
546 vmClasses::ValueObjectMethods_klass(),
547 vmSymbols::isSubstitutable_name(),
548 vmSymbols::object_object_boolean_signature(),
549 &args, CHECK_0);
550 return result.get_jboolean() ? 1 : 0;
551 JRT_END
552
553
554 extern "C" void ps();
555
556 void Runtime1::buffer_inline_args_impl(JavaThread* current, Method* m, bool allocate_receiver) {
557 JavaThread* THREAD = current;
558 methodHandle method(current, m); // We are inside the verified_entry or verified_inline_ro_entry of this method.
559 oop obj = SharedRuntime::allocate_inline_types_impl(current, method, allocate_receiver, CHECK);
560 current->set_vm_result(obj);
561 }
562
563 JRT_ENTRY(void, Runtime1::buffer_inline_args(JavaThread* current, Method* method))
564 NOT_PRODUCT(_buffer_inline_args_slowcase_cnt++;)
565 buffer_inline_args_impl(current, method, true);
566 JRT_END
567
568 JRT_ENTRY(void, Runtime1::buffer_inline_args_no_receiver(JavaThread* current, Method* method))
569 NOT_PRODUCT(_buffer_inline_args_no_receiver_slowcase_cnt++;)
570 buffer_inline_args_impl(current, method, false);
571 JRT_END
572
573 JRT_ENTRY(void, Runtime1::unimplemented_entry(JavaThread* current, C1StubId id))
574 tty->print_cr("Runtime1::entry_for(%d) returned unimplemented entry point", (int)id);
575 JRT_END
576
577
578 JRT_ENTRY(void, Runtime1::throw_array_store_exception(JavaThread* current, oopDesc* obj))
579 ResourceMark rm(current);
580 const char* klass_name = obj->klass()->external_name();
581 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ArrayStoreException(), klass_name);
582 JRT_END
583
584
585 // counter_overflow() is called from within C1-compiled methods. The enclosing method is the method
586 // associated with the top activation record. The inlinee (that is possibly included in the enclosing
587 // method) method is passed as an argument. In order to do that it is embedded in the code as
588 // a constant.
589 static nmethod* counter_overflow_helper(JavaThread* current, int branch_bci, Method* m) {
590 nmethod* osr_nm = nullptr;
591 methodHandle method(current, m);
592
876 _throw_class_cast_exception_count++;
877 }
878 #endif
879 ResourceMark rm(current);
880 char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
881 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ClassCastException(), message);
882 JRT_END
883
884
885 JRT_ENTRY(void, Runtime1::throw_incompatible_class_change_error(JavaThread* current))
886 #ifndef PRODUCT
887 if (PrintC1Statistics) {
888 _throw_incompatible_class_change_error_count++;
889 }
890 #endif
891 ResourceMark rm(current);
892 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IncompatibleClassChangeError());
893 JRT_END
894
895
896 JRT_ENTRY(void, Runtime1::throw_illegal_monitor_state_exception(JavaThread* current))
897 NOT_PRODUCT(_throw_illegal_monitor_state_exception_count++;)
898 ResourceMark rm(current);
899 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IllegalMonitorStateException());
900 JRT_END
901
902 JRT_ENTRY(void, Runtime1::throw_identity_exception(JavaThread* current, oopDesc* object))
903 NOT_PRODUCT(_throw_identity_exception_count++;)
904 ResourceMark rm(current);
905 char* message = SharedRuntime::generate_identity_exception_message(current, object->klass());
906 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IdentityException(), message);
907 JRT_END
908
909 JRT_BLOCK_ENTRY(void, Runtime1::monitorenter(JavaThread* current, oopDesc* obj, BasicObjectLock* lock))
910 #ifndef PRODUCT
911 if (PrintC1Statistics) {
912 _monitorenter_slowcase_cnt++;
913 }
914 #endif
915 if (LockingMode == LM_MONITOR) {
916 lock->set_obj(obj);
917 }
918 assert(obj == lock->obj(), "must match");
919 SharedRuntime::monitor_enter_helper(obj, lock->lock(), current);
920 JRT_END
921
922
923 JRT_LEAF(void, Runtime1::monitorexit(JavaThread* current, BasicObjectLock* lock))
924 assert(current == JavaThread::current(), "pre-condition");
925 #ifndef PRODUCT
926 if (PrintC1Statistics) {
927 _monitorexit_slowcase_cnt++;
928 }
1094 RegisterMap::WalkContinuation::skip);
1095 frame runtime_frame = current->last_frame();
1096 frame caller_frame = runtime_frame.sender(®_map);
1097
1098 // last java frame on stack
1099 vframeStream vfst(current, true);
1100 assert(!vfst.at_end(), "Java frame must exist");
1101
1102 methodHandle caller_method(current, vfst.method());
1103 // Note that caller_method->code() may not be same as caller_code because of OSR's
1104 // Note also that in the presence of inlining it is not guaranteed
1105 // that caller_method() == caller_code->method()
1106
1107 int bci = vfst.bci();
1108 Bytecodes::Code code = caller_method()->java_code_at(bci);
1109
1110 // this is used by assertions in the access_field_patching_id
1111 BasicType patch_field_type = T_ILLEGAL;
1112 bool deoptimize_for_volatile = false;
1113 bool deoptimize_for_atomic = false;
1114 bool deoptimize_for_null_free = false;
1115 bool deoptimize_for_flat = false;
1116 int patch_field_offset = -1;
1117 Klass* init_klass = nullptr; // klass needed by load_klass_patching code
1118 Klass* load_klass = nullptr; // klass needed by load_klass_patching code
1119 Handle mirror(current, nullptr); // oop needed by load_mirror_patching code
1120 Handle appendix(current, nullptr); // oop needed by appendix_patching code
1121 bool load_klass_or_mirror_patch_id =
1122 (stub_id == C1StubId::load_klass_patching_id || stub_id == C1StubId::load_mirror_patching_id);
1123
1124 if (stub_id == C1StubId::access_field_patching_id) {
1125
1126 Bytecode_field field_access(caller_method, bci);
1127 fieldDescriptor result; // initialize class if needed
1128 Bytecodes::Code code = field_access.code();
1129 constantPoolHandle constants(current, caller_method->constants());
1130 LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK);
1131 patch_field_offset = result.offset();
1132
1133 // If we're patching a field which is volatile then at compile it
1134 // must not have been know to be volatile, so the generated code
1135 // isn't correct for a volatile reference. The nmethod has to be
1139 // used for patching references to oops which don't need special
1140 // handling in the volatile case.
1141
1142 deoptimize_for_volatile = result.access_flags().is_volatile();
1143
1144 // If we are patching a field which should be atomic, then
1145 // the generated code is not correct either, force deoptimizing.
1146 // We need to only cover T_LONG and T_DOUBLE fields, as we can
1147 // break access atomicity only for them.
1148
1149 // Strictly speaking, the deoptimization on 64-bit platforms
1150 // is unnecessary, and T_LONG stores on 32-bit platforms need
1151 // to be handled by special patching code when AlwaysAtomicAccesses
1152 // becomes product feature. At this point, we are still going
1153 // for the deoptimization for consistency against volatile
1154 // accesses.
1155
1156 patch_field_type = result.field_type();
1157 deoptimize_for_atomic = (AlwaysAtomicAccesses && (patch_field_type == T_DOUBLE || patch_field_type == T_LONG));
1158
1159 // The field we are patching is null-free. Deoptimize and regenerate
1160 // the compiled code if we patch a putfield/putstatic because it
1161 // does not contain the required null check.
1162 deoptimize_for_null_free = result.is_null_free_inline_type() && (field_access.is_putfield() || field_access.is_putstatic());
1163
1164 // The field we are patching is flat. Deoptimize and regenerate
1165 // the compiled code which can't handle the layout of the flat
1166 // field because it was unknown at compile time.
1167 deoptimize_for_flat = result.is_flat();
1168
1169 } else if (load_klass_or_mirror_patch_id) {
1170 Klass* k = nullptr;
1171 switch (code) {
1172 case Bytecodes::_putstatic:
1173 case Bytecodes::_getstatic:
1174 { Klass* klass = resolve_field_return_klass(caller_method, bci, CHECK);
1175 init_klass = klass;
1176 mirror = Handle(current, klass->java_mirror());
1177 }
1178 break;
1179 case Bytecodes::_new:
1180 { Bytecode_new bnew(caller_method(), caller_method->bcp_from(bci));
1181 k = caller_method->constants()->klass_at(bnew.index(), CHECK);
1182 }
1183 break;
1184 case Bytecodes::_multianewarray:
1185 { Bytecode_multianewarray mna(caller_method(), caller_method->bcp_from(bci));
1186 k = caller_method->constants()->klass_at(mna.index(), CHECK);
1187 }
1188 break;
1221 CallInfo info;
1222 constantPoolHandle pool(current, caller_method->constants());
1223 int index = bytecode.index();
1224 LinkResolver::resolve_invoke(info, Handle(), pool, index, bc, CHECK);
1225 switch (bc) {
1226 case Bytecodes::_invokehandle: {
1227 ResolvedMethodEntry* entry = pool->cache()->set_method_handle(index, info);
1228 appendix = Handle(current, pool->cache()->appendix_if_resolved(entry));
1229 break;
1230 }
1231 case Bytecodes::_invokedynamic: {
1232 appendix = Handle(current, pool->cache()->set_dynamic_call(info, index));
1233 break;
1234 }
1235 default: fatal("unexpected bytecode for load_appendix_patching_id");
1236 }
1237 } else {
1238 ShouldNotReachHere();
1239 }
1240
1241 if (deoptimize_for_volatile || deoptimize_for_atomic || deoptimize_for_null_free || deoptimize_for_flat) {
1242 // At compile time we assumed the field wasn't volatile/atomic but after
1243 // loading it turns out it was volatile/atomic so we have to throw the
1244 // compiled code out and let it be regenerated.
1245 if (TracePatching) {
1246 if (deoptimize_for_volatile) {
1247 tty->print_cr("Deoptimizing for patching volatile field reference");
1248 }
1249 if (deoptimize_for_atomic) {
1250 tty->print_cr("Deoptimizing for patching atomic field reference");
1251 }
1252 if (deoptimize_for_null_free) {
1253 tty->print_cr("Deoptimizing for patching null-free field reference");
1254 }
1255 if (deoptimize_for_flat) {
1256 tty->print_cr("Deoptimizing for patching flat field reference");
1257 }
1258 }
1259
1260 // It's possible the nmethod was invalidated in the last
1261 // safepoint, but if it's still alive then make it not_entrant.
1262 nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
1263 if (nm != nullptr) {
1264 nm->make_not_entrant();
1265 }
1266
1267 Deoptimization::deoptimize_frame(current, caller_frame.id());
1268
1269 // Return to the now deoptimized frame.
1270 }
1271
1272 // Now copy code back
1273
1274 {
1275 MutexLocker ml_code (current, CodeCache_lock, Mutex::_no_safepoint_check_flag);
1276 //
1277 // Deoptimization may have happened while we waited for the lock.
1688 #ifndef PRODUCT
1689 void Runtime1::print_statistics() {
1690 tty->print_cr("C1 Runtime statistics:");
1691 tty->print_cr(" _resolve_invoke_virtual_cnt: %u", SharedRuntime::_resolve_virtual_ctr);
1692 tty->print_cr(" _resolve_invoke_opt_virtual_cnt: %u", SharedRuntime::_resolve_opt_virtual_ctr);
1693 tty->print_cr(" _resolve_invoke_static_cnt: %u", SharedRuntime::_resolve_static_ctr);
1694 tty->print_cr(" _handle_wrong_method_cnt: %u", SharedRuntime::_wrong_method_ctr);
1695 tty->print_cr(" _ic_miss_cnt: %u", SharedRuntime::_ic_miss_ctr);
1696 tty->print_cr(" _generic_arraycopystub_cnt: %u", _generic_arraycopystub_cnt);
1697 tty->print_cr(" _byte_arraycopy_cnt: %u", _byte_arraycopy_stub_cnt);
1698 tty->print_cr(" _short_arraycopy_cnt: %u", _short_arraycopy_stub_cnt);
1699 tty->print_cr(" _int_arraycopy_cnt: %u", _int_arraycopy_stub_cnt);
1700 tty->print_cr(" _long_arraycopy_cnt: %u", _long_arraycopy_stub_cnt);
1701 tty->print_cr(" _oop_arraycopy_cnt: %u", _oop_arraycopy_stub_cnt);
1702 tty->print_cr(" _arraycopy_slowcase_cnt: %u", _arraycopy_slowcase_cnt);
1703 tty->print_cr(" _arraycopy_checkcast_cnt: %u", _arraycopy_checkcast_cnt);
1704 tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%u", _arraycopy_checkcast_attempt_cnt);
1705
1706 tty->print_cr(" _new_type_array_slowcase_cnt: %u", _new_type_array_slowcase_cnt);
1707 tty->print_cr(" _new_object_array_slowcase_cnt: %u", _new_object_array_slowcase_cnt);
1708 tty->print_cr(" _new_null_free_array_slowcase_cnt: %u", _new_null_free_array_slowcase_cnt);
1709 tty->print_cr(" _new_instance_slowcase_cnt: %u", _new_instance_slowcase_cnt);
1710 tty->print_cr(" _new_multi_array_slowcase_cnt: %u", _new_multi_array_slowcase_cnt);
1711 tty->print_cr(" _load_flat_array_slowcase_cnt: %u", _load_flat_array_slowcase_cnt);
1712 tty->print_cr(" _store_flat_array_slowcase_cnt: %u", _store_flat_array_slowcase_cnt);
1713 tty->print_cr(" _substitutability_check_slowcase_cnt: %u", _substitutability_check_slowcase_cnt);
1714 tty->print_cr(" _buffer_inline_args_slowcase_cnt:%u", _buffer_inline_args_slowcase_cnt);
1715 tty->print_cr(" _buffer_inline_args_no_receiver_slowcase_cnt:%u", _buffer_inline_args_no_receiver_slowcase_cnt);
1716
1717 tty->print_cr(" _monitorenter_slowcase_cnt: %u", _monitorenter_slowcase_cnt);
1718 tty->print_cr(" _monitorexit_slowcase_cnt: %u", _monitorexit_slowcase_cnt);
1719 tty->print_cr(" _patch_code_slowcase_cnt: %u", _patch_code_slowcase_cnt);
1720
1721 tty->print_cr(" _throw_range_check_exception_count: %u:", _throw_range_check_exception_count);
1722 tty->print_cr(" _throw_index_exception_count: %u:", _throw_index_exception_count);
1723 tty->print_cr(" _throw_div0_exception_count: %u:", _throw_div0_exception_count);
1724 tty->print_cr(" _throw_null_pointer_exception_count: %u:", _throw_null_pointer_exception_count);
1725 tty->print_cr(" _throw_class_cast_exception_count: %u:", _throw_class_cast_exception_count);
1726 tty->print_cr(" _throw_incompatible_class_change_error_count: %u:", _throw_incompatible_class_change_error_count);
1727 tty->print_cr(" _throw_illegal_monitor_state_exception_count: %u:", _throw_illegal_monitor_state_exception_count);
1728 tty->print_cr(" _throw_identity_exception_count: %u:", _throw_identity_exception_count);
1729 tty->print_cr(" _throw_count: %u:", _throw_count);
1730
1731 SharedRuntime::print_ic_miss_histogram();
1732 tty->cr();
1733 }
1734 #endif // PRODUCT
|