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/objArrayKlass.hpp"
53 #include "oops/objArrayOop.inline.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;
338 FUNCTION_CASE(entry, JfrTime::time_function());
339 #endif
340 FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32());
341 FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32C());
342 FUNCTION_CASE(entry, StubRoutines::vectorizedMismatch());
343 FUNCTION_CASE(entry, StubRoutines::dexp());
344 FUNCTION_CASE(entry, StubRoutines::dlog());
345 FUNCTION_CASE(entry, StubRoutines::dlog10());
346 FUNCTION_CASE(entry, StubRoutines::dpow());
347 FUNCTION_CASE(entry, StubRoutines::dsin());
348 FUNCTION_CASE(entry, StubRoutines::dcos());
349 FUNCTION_CASE(entry, StubRoutines::dtan());
350 FUNCTION_CASE(entry, StubRoutines::dtanh());
351
352 #undef FUNCTION_CASE
353
354 // Soft float adds more runtime names.
355 return pd_name_for_address(entry);
356 }
357
358
359 JRT_ENTRY(void, Runtime1::new_instance(JavaThread* current, Klass* klass))
360 #ifndef PRODUCT
361 if (PrintC1Statistics) {
362 _new_instance_slowcase_cnt++;
363 }
364 #endif
365 assert(klass->is_klass(), "not a class");
366 Handle holder(current, klass->klass_holder()); // keep the klass alive
367 InstanceKlass* h = InstanceKlass::cast(klass);
368 h->check_valid_for_instantiation(true, CHECK);
369 // make sure klass is initialized
370 h->initialize(CHECK);
371 // allocate instance and return via TLS
372 oop obj = h->allocate_instance(CHECK);
373 current->set_vm_result(obj);
374 JRT_END
375
376
377 JRT_ENTRY(void, Runtime1::new_type_array(JavaThread* current, Klass* klass, jint length))
378 #ifndef PRODUCT
379 if (PrintC1Statistics) {
380 _new_type_array_slowcase_cnt++;
381 }
382 #endif
383 // Note: no handle for klass needed since they are not used
384 // anymore after new_typeArray() and no GC can happen before.
385 // (This may have to change if this code changes!)
386 assert(klass->is_klass(), "not a class");
387 BasicType elt_type = TypeArrayKlass::cast(klass)->element_type();
388 oop obj = oopFactory::new_typeArray(elt_type, length, CHECK);
389 current->set_vm_result(obj);
390 // This is pretty rare but this runtime patch is stressful to deoptimization
391 // if we deoptimize here so force a deopt to stress the path.
392 if (DeoptimizeALot) {
393 deopt_caller(current);
394 }
395
396 JRT_END
397
398
399 JRT_ENTRY(void, Runtime1::new_object_array(JavaThread* current, Klass* array_klass, jint length))
400 #ifndef PRODUCT
401 if (PrintC1Statistics) {
402 _new_object_array_slowcase_cnt++;
403 }
404 #endif
405 // Note: no handle for klass needed since they are not used
406 // anymore after new_objArray() and no GC can happen before.
407 // (This may have to change if this code changes!)
408 assert(array_klass->is_klass(), "not a class");
409 Handle holder(current, array_klass->klass_holder()); // keep the klass alive
410 Klass* elem_klass = ObjArrayKlass::cast(array_klass)->element_klass();
411 objArrayOop obj = oopFactory::new_objArray(elem_klass, length, CHECK);
412 current->set_vm_result(obj);
413 // This is pretty rare but this runtime patch is stressful to deoptimization
414 // if we deoptimize here so force a deopt to stress the path.
415 if (DeoptimizeALot) {
416 deopt_caller(current);
417 }
418 JRT_END
419
420
421 JRT_ENTRY(void, Runtime1::new_multi_array(JavaThread* current, Klass* klass, int rank, jint* dims))
422 #ifndef PRODUCT
423 if (PrintC1Statistics) {
424 _new_multi_array_slowcase_cnt++;
425 }
426 #endif
427 assert(klass->is_klass(), "not a class");
428 assert(rank >= 1, "rank must be nonzero");
429 Handle holder(current, klass->klass_holder()); // keep the klass alive
430 oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK);
431 current->set_vm_result(obj);
432 JRT_END
433
434
435 JRT_ENTRY(void, Runtime1::unimplemented_entry(JavaThread* current, C1StubId id))
436 tty->print_cr("Runtime1::entry_for(%d) returned unimplemented entry point", (int)id);
437 JRT_END
438
439
440 JRT_ENTRY(void, Runtime1::throw_array_store_exception(JavaThread* current, oopDesc* obj))
441 ResourceMark rm(current);
442 const char* klass_name = obj->klass()->external_name();
443 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ArrayStoreException(), klass_name);
444 JRT_END
445
446
447 // counter_overflow() is called from within C1-compiled methods. The enclosing method is the method
448 // associated with the top activation record. The inlinee (that is possibly included in the enclosing
449 // method) method is passed as an argument. In order to do that it is embedded in the code as
450 // a constant.
451 static nmethod* counter_overflow_helper(JavaThread* current, int branch_bci, Method* m) {
452 nmethod* osr_nm = nullptr;
453 methodHandle method(current, m);
454
738 _throw_class_cast_exception_count++;
739 }
740 #endif
741 ResourceMark rm(current);
742 char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
743 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ClassCastException(), message);
744 JRT_END
745
746
747 JRT_ENTRY(void, Runtime1::throw_incompatible_class_change_error(JavaThread* current))
748 #ifndef PRODUCT
749 if (PrintC1Statistics) {
750 _throw_incompatible_class_change_error_count++;
751 }
752 #endif
753 ResourceMark rm(current);
754 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IncompatibleClassChangeError());
755 JRT_END
756
757
758 JRT_BLOCK_ENTRY(void, Runtime1::monitorenter(JavaThread* current, oopDesc* obj, BasicObjectLock* lock))
759 #ifndef PRODUCT
760 if (PrintC1Statistics) {
761 _monitorenter_slowcase_cnt++;
762 }
763 #endif
764 if (LockingMode == LM_MONITOR) {
765 lock->set_obj(obj);
766 }
767 assert(obj == lock->obj(), "must match");
768 SharedRuntime::monitor_enter_helper(obj, lock->lock(), current);
769 JRT_END
770
771
772 JRT_LEAF(void, Runtime1::monitorexit(JavaThread* current, BasicObjectLock* lock))
773 assert(current == JavaThread::current(), "pre-condition");
774 #ifndef PRODUCT
775 if (PrintC1Statistics) {
776 _monitorexit_slowcase_cnt++;
777 }
943 RegisterMap::WalkContinuation::skip);
944 frame runtime_frame = current->last_frame();
945 frame caller_frame = runtime_frame.sender(®_map);
946
947 // last java frame on stack
948 vframeStream vfst(current, true);
949 assert(!vfst.at_end(), "Java frame must exist");
950
951 methodHandle caller_method(current, vfst.method());
952 // Note that caller_method->code() may not be same as caller_code because of OSR's
953 // Note also that in the presence of inlining it is not guaranteed
954 // that caller_method() == caller_code->method()
955
956 int bci = vfst.bci();
957 Bytecodes::Code code = caller_method()->java_code_at(bci);
958
959 // this is used by assertions in the access_field_patching_id
960 BasicType patch_field_type = T_ILLEGAL;
961 bool deoptimize_for_volatile = false;
962 bool deoptimize_for_atomic = false;
963 int patch_field_offset = -1;
964 Klass* init_klass = nullptr; // klass needed by load_klass_patching code
965 Klass* load_klass = nullptr; // klass needed by load_klass_patching code
966 Handle mirror(current, nullptr); // oop needed by load_mirror_patching code
967 Handle appendix(current, nullptr); // oop needed by appendix_patching code
968 bool load_klass_or_mirror_patch_id =
969 (stub_id == C1StubId::load_klass_patching_id || stub_id == C1StubId::load_mirror_patching_id);
970
971 if (stub_id == C1StubId::access_field_patching_id) {
972
973 Bytecode_field field_access(caller_method, bci);
974 fieldDescriptor result; // initialize class if needed
975 Bytecodes::Code code = field_access.code();
976 constantPoolHandle constants(current, caller_method->constants());
977 LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK);
978 patch_field_offset = result.offset();
979
980 // If we're patching a field which is volatile then at compile it
981 // must not have been know to be volatile, so the generated code
982 // isn't correct for a volatile reference. The nmethod has to be
986 // used for patching references to oops which don't need special
987 // handling in the volatile case.
988
989 deoptimize_for_volatile = result.access_flags().is_volatile();
990
991 // If we are patching a field which should be atomic, then
992 // the generated code is not correct either, force deoptimizing.
993 // We need to only cover T_LONG and T_DOUBLE fields, as we can
994 // break access atomicity only for them.
995
996 // Strictly speaking, the deoptimization on 64-bit platforms
997 // is unnecessary, and T_LONG stores on 32-bit platforms need
998 // to be handled by special patching code when AlwaysAtomicAccesses
999 // becomes product feature. At this point, we are still going
1000 // for the deoptimization for consistency against volatile
1001 // accesses.
1002
1003 patch_field_type = result.field_type();
1004 deoptimize_for_atomic = (AlwaysAtomicAccesses && (patch_field_type == T_DOUBLE || patch_field_type == T_LONG));
1005
1006 } else if (load_klass_or_mirror_patch_id) {
1007 Klass* k = nullptr;
1008 switch (code) {
1009 case Bytecodes::_putstatic:
1010 case Bytecodes::_getstatic:
1011 { Klass* klass = resolve_field_return_klass(caller_method, bci, CHECK);
1012 init_klass = klass;
1013 mirror = Handle(current, klass->java_mirror());
1014 }
1015 break;
1016 case Bytecodes::_new:
1017 { Bytecode_new bnew(caller_method(), caller_method->bcp_from(bci));
1018 k = caller_method->constants()->klass_at(bnew.index(), CHECK);
1019 }
1020 break;
1021 case Bytecodes::_multianewarray:
1022 { Bytecode_multianewarray mna(caller_method(), caller_method->bcp_from(bci));
1023 k = caller_method->constants()->klass_at(mna.index(), CHECK);
1024 }
1025 break;
1058 CallInfo info;
1059 constantPoolHandle pool(current, caller_method->constants());
1060 int index = bytecode.index();
1061 LinkResolver::resolve_invoke(info, Handle(), pool, index, bc, CHECK);
1062 switch (bc) {
1063 case Bytecodes::_invokehandle: {
1064 ResolvedMethodEntry* entry = pool->cache()->set_method_handle(index, info);
1065 appendix = Handle(current, pool->cache()->appendix_if_resolved(entry));
1066 break;
1067 }
1068 case Bytecodes::_invokedynamic: {
1069 appendix = Handle(current, pool->cache()->set_dynamic_call(info, index));
1070 break;
1071 }
1072 default: fatal("unexpected bytecode for load_appendix_patching_id");
1073 }
1074 } else {
1075 ShouldNotReachHere();
1076 }
1077
1078 if (deoptimize_for_volatile || deoptimize_for_atomic) {
1079 // At compile time we assumed the field wasn't volatile/atomic but after
1080 // loading it turns out it was volatile/atomic so we have to throw the
1081 // compiled code out and let it be regenerated.
1082 if (TracePatching) {
1083 if (deoptimize_for_volatile) {
1084 tty->print_cr("Deoptimizing for patching volatile field reference");
1085 }
1086 if (deoptimize_for_atomic) {
1087 tty->print_cr("Deoptimizing for patching atomic field reference");
1088 }
1089 }
1090
1091 // It's possible the nmethod was invalidated in the last
1092 // safepoint, but if it's still alive then make it not_entrant.
1093 nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
1094 if (nm != nullptr) {
1095 nm->make_not_entrant("C1 code patch");
1096 }
1097
1098 Deoptimization::deoptimize_frame(current, caller_frame.id());
1099
1100 // Return to the now deoptimized frame.
1101 }
1102
1103 // Now copy code back
1104
1105 {
1106 MutexLocker ml_code (current, CodeCache_lock, Mutex::_no_safepoint_check_flag);
1107 //
1108 // Deoptimization may have happened while we waited for the lock.
1519 #ifndef PRODUCT
1520 void Runtime1::print_statistics() {
1521 tty->print_cr("C1 Runtime statistics:");
1522 tty->print_cr(" _resolve_invoke_virtual_cnt: %u", SharedRuntime::_resolve_virtual_ctr);
1523 tty->print_cr(" _resolve_invoke_opt_virtual_cnt: %u", SharedRuntime::_resolve_opt_virtual_ctr);
1524 tty->print_cr(" _resolve_invoke_static_cnt: %u", SharedRuntime::_resolve_static_ctr);
1525 tty->print_cr(" _handle_wrong_method_cnt: %u", SharedRuntime::_wrong_method_ctr);
1526 tty->print_cr(" _ic_miss_cnt: %u", SharedRuntime::_ic_miss_ctr);
1527 tty->print_cr(" _generic_arraycopystub_cnt: %u", _generic_arraycopystub_cnt);
1528 tty->print_cr(" _byte_arraycopy_cnt: %u", _byte_arraycopy_stub_cnt);
1529 tty->print_cr(" _short_arraycopy_cnt: %u", _short_arraycopy_stub_cnt);
1530 tty->print_cr(" _int_arraycopy_cnt: %u", _int_arraycopy_stub_cnt);
1531 tty->print_cr(" _long_arraycopy_cnt: %u", _long_arraycopy_stub_cnt);
1532 tty->print_cr(" _oop_arraycopy_cnt: %u", _oop_arraycopy_stub_cnt);
1533 tty->print_cr(" _arraycopy_slowcase_cnt: %u", _arraycopy_slowcase_cnt);
1534 tty->print_cr(" _arraycopy_checkcast_cnt: %u", _arraycopy_checkcast_cnt);
1535 tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%u", _arraycopy_checkcast_attempt_cnt);
1536
1537 tty->print_cr(" _new_type_array_slowcase_cnt: %u", _new_type_array_slowcase_cnt);
1538 tty->print_cr(" _new_object_array_slowcase_cnt: %u", _new_object_array_slowcase_cnt);
1539 tty->print_cr(" _new_instance_slowcase_cnt: %u", _new_instance_slowcase_cnt);
1540 tty->print_cr(" _new_multi_array_slowcase_cnt: %u", _new_multi_array_slowcase_cnt);
1541 tty->print_cr(" _monitorenter_slowcase_cnt: %u", _monitorenter_slowcase_cnt);
1542 tty->print_cr(" _monitorexit_slowcase_cnt: %u", _monitorexit_slowcase_cnt);
1543 tty->print_cr(" _patch_code_slowcase_cnt: %u", _patch_code_slowcase_cnt);
1544
1545 tty->print_cr(" _throw_range_check_exception_count: %u:", _throw_range_check_exception_count);
1546 tty->print_cr(" _throw_index_exception_count: %u:", _throw_index_exception_count);
1547 tty->print_cr(" _throw_div0_exception_count: %u:", _throw_div0_exception_count);
1548 tty->print_cr(" _throw_null_pointer_exception_count: %u:", _throw_null_pointer_exception_count);
1549 tty->print_cr(" _throw_class_cast_exception_count: %u:", _throw_class_cast_exception_count);
1550 tty->print_cr(" _throw_incompatible_class_change_error_count: %u:", _throw_incompatible_class_change_error_count);
1551 tty->print_cr(" _throw_count: %u:", _throw_count);
1552
1553 SharedRuntime::print_ic_miss_histogram();
1554 tty->cr();
1555 }
1556 #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/objArrayKlass.hpp"
55 #include "oops/objArrayOop.inline.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;
348 FUNCTION_CASE(entry, JfrTime::time_function());
349 #endif
350 FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32());
351 FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32C());
352 FUNCTION_CASE(entry, StubRoutines::vectorizedMismatch());
353 FUNCTION_CASE(entry, StubRoutines::dexp());
354 FUNCTION_CASE(entry, StubRoutines::dlog());
355 FUNCTION_CASE(entry, StubRoutines::dlog10());
356 FUNCTION_CASE(entry, StubRoutines::dpow());
357 FUNCTION_CASE(entry, StubRoutines::dsin());
358 FUNCTION_CASE(entry, StubRoutines::dcos());
359 FUNCTION_CASE(entry, StubRoutines::dtan());
360 FUNCTION_CASE(entry, StubRoutines::dtanh());
361
362 #undef FUNCTION_CASE
363
364 // Soft float adds more runtime names.
365 return pd_name_for_address(entry);
366 }
367
368 static void allocate_instance(JavaThread* current, Klass* klass, TRAPS) {
369 #ifndef PRODUCT
370 if (PrintC1Statistics) {
371 Runtime1::_new_instance_slowcase_cnt++;
372 }
373 #endif
374 assert(klass->is_klass(), "not a class");
375 Handle holder(current, klass->klass_holder()); // keep the klass alive
376 InstanceKlass* h = InstanceKlass::cast(klass);
377 h->check_valid_for_instantiation(true, CHECK);
378 // make sure klass is initialized
379 h->initialize(CHECK);
380 // allocate instance and return via TLS
381 oop obj = h->allocate_instance(CHECK);
382 current->set_vm_result(obj);
383 JRT_END
384
385 JRT_ENTRY(void, Runtime1::new_instance(JavaThread* current, Klass* klass))
386 allocate_instance(current, klass, CHECK);
387 JRT_END
388
389 JRT_ENTRY(void, Runtime1::new_type_array(JavaThread* current, Klass* klass, jint length))
390 #ifndef PRODUCT
391 if (PrintC1Statistics) {
392 _new_type_array_slowcase_cnt++;
393 }
394 #endif
395 // Note: no handle for klass needed since they are not used
396 // anymore after new_typeArray() and no GC can happen before.
397 // (This may have to change if this code changes!)
398 assert(klass->is_klass(), "not a class");
399 BasicType elt_type = TypeArrayKlass::cast(klass)->element_type();
400 oop obj = oopFactory::new_typeArray(elt_type, length, CHECK);
401 current->set_vm_result(obj);
402 // This is pretty rare but this runtime patch is stressful to deoptimization
403 // if we deoptimize here so force a deopt to stress the path.
404 if (DeoptimizeALot) {
405 deopt_caller(current);
406 }
407
408 JRT_END
409
410
411 JRT_ENTRY(void, Runtime1::new_object_array(JavaThread* current, Klass* array_klass, jint length))
412 #ifndef PRODUCT
413 if (PrintC1Statistics) {
414 _new_object_array_slowcase_cnt++;
415 }
416 #endif
417 // Note: no handle for klass needed since they are not used
418 // anymore after new_objArray() and no GC can happen before.
419 // (This may have to change if this code changes!)
420 assert(array_klass->is_klass(), "not a class");
421 Handle holder(current, array_klass->klass_holder()); // keep the klass alive
422 Klass* elem_klass = ArrayKlass::cast(array_klass)->element_klass();
423 objArrayOop obj = oopFactory::new_objArray(elem_klass, length, CHECK);
424 current->set_vm_result(obj);
425 // This is pretty rare but this runtime patch is stressful to deoptimization
426 // if we deoptimize here so force a deopt to stress the path.
427 if (DeoptimizeALot) {
428 deopt_caller(current);
429 }
430 JRT_END
431
432
433 JRT_ENTRY(void, Runtime1::new_null_free_array(JavaThread* current, Klass* array_klass, jint length))
434 NOT_PRODUCT(_new_null_free_array_slowcase_cnt++;)
435 // 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.
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 if (UseArrayFlattening && vk->has_non_atomic_layout()) {
449 obj = oopFactory::new_flatArray(elem_klass, length, LayoutKind::NON_ATOMIC_FLAT, CHECK);
450 } else {
451 obj = oopFactory::new_null_free_objArray(elem_klass, length, CHECK);
452 }
453 current->set_vm_result(obj);
454 // This is pretty rare but this runtime patch is stressful to deoptimization
455 // if we deoptimize here so force a deopt to stress the path.
456 if (DeoptimizeALot) {
457 deopt_caller(current);
458 }
459 JRT_END
460
461
462 JRT_ENTRY(void, Runtime1::new_multi_array(JavaThread* current, Klass* klass, int rank, jint* dims))
463 #ifndef PRODUCT
464 if (PrintC1Statistics) {
465 _new_multi_array_slowcase_cnt++;
466 }
467 #endif
468 assert(klass->is_klass(), "not a class");
469 assert(rank >= 1, "rank must be nonzero");
470 Handle holder(current, klass->klass_holder()); // keep the klass alive
471 oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK);
472 current->set_vm_result(obj);
473 JRT_END
474
475
476 static void profile_flat_array(JavaThread* current, bool load, bool null_free) {
477 ResourceMark rm(current);
478 vframeStream vfst(current, true);
479 assert(!vfst.at_end(), "Java frame must exist");
480 // Check if array access profiling is enabled
481 if (vfst.nm()->comp_level() != CompLevel_full_profile || !C1UpdateMethodData) {
482 return;
483 }
484 int bci = vfst.bci();
485 Method* method = vfst.method();
486 MethodData* md = method->method_data();
487 if (md != nullptr) {
488 // Lock to access ProfileData, and ensure lock is not broken by a safepoint
489 MutexLocker ml(md->extra_data_lock(), Mutex::_no_safepoint_check_flag);
490
491 ProfileData* data = md->bci_to_data(bci);
492 assert(data != nullptr, "incorrect profiling entry");
493 if (data->is_ArrayLoadData()) {
494 assert(load, "should be an array load");
495 ArrayLoadData* load_data = (ArrayLoadData*) data;
496 load_data->set_flat_array();
497 if (null_free) {
498 load_data->set_null_free_array();
499 }
500 } else {
501 assert(data->is_ArrayStoreData(), "");
502 assert(!load, "should be an array store");
503 ArrayStoreData* store_data = (ArrayStoreData*) data;
504 store_data->set_flat_array();
505 if (null_free) {
506 store_data->set_null_free_array();
507 }
508 }
509 }
510 }
511
512 JRT_ENTRY(void, Runtime1::load_flat_array(JavaThread* current, flatArrayOopDesc* array, int index))
513 assert(array->klass()->is_flatArray_klass(), "should not be called");
514 profile_flat_array(current, true, array->is_null_free_array());
515
516 NOT_PRODUCT(_load_flat_array_slowcase_cnt++;)
517 assert(array->length() > 0 && index < array->length(), "already checked");
518 flatArrayHandle vah(current, array);
519 oop obj = array->read_value_from_flat_array(index, CHECK);
520 current->set_vm_result(obj);
521 JRT_END
522
523 JRT_ENTRY(void, Runtime1::store_flat_array(JavaThread* current, flatArrayOopDesc* array, int index, oopDesc* value))
524 // TOOD 8350865 We can call here with a non-flat array because of LIR_Assembler::emit_opFlattenedArrayCheck
525 if (array->klass()->is_flatArray_klass()) {
526 profile_flat_array(current, false, array->is_null_free_array());
527 }
528
529 NOT_PRODUCT(_store_flat_array_slowcase_cnt++;)
530 if (value == nullptr && array->is_null_free_array()) {
531 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_NullPointerException());
532 } else {
533 assert(array->klass()->is_flatArray_klass(), "should not be called");
534 array->write_value_to_flat_array(value, index, CHECK);
535 }
536 JRT_END
537
538 JRT_ENTRY(int, Runtime1::substitutability_check(JavaThread* current, oopDesc* left, oopDesc* right))
539 NOT_PRODUCT(_substitutability_check_slowcase_cnt++;)
540 JavaCallArguments args;
541 args.push_oop(Handle(THREAD, left));
542 args.push_oop(Handle(THREAD, right));
543 JavaValue result(T_BOOLEAN);
544 JavaCalls::call_static(&result,
545 vmClasses::ValueObjectMethods_klass(),
546 vmSymbols::isSubstitutable_name(),
547 vmSymbols::object_object_boolean_signature(),
548 &args, CHECK_0);
549 return result.get_jboolean() ? 1 : 0;
550 JRT_END
551
552
553 extern "C" void ps();
554
555 void Runtime1::buffer_inline_args_impl(JavaThread* current, Method* m, bool allocate_receiver) {
556 JavaThread* THREAD = current;
557 methodHandle method(current, m); // We are inside the verified_entry or verified_inline_ro_entry of this method.
558 oop obj = SharedRuntime::allocate_inline_types_impl(current, method, allocate_receiver, CHECK);
559 current->set_vm_result(obj);
560 }
561
562 JRT_ENTRY(void, Runtime1::buffer_inline_args(JavaThread* current, Method* method))
563 NOT_PRODUCT(_buffer_inline_args_slowcase_cnt++;)
564 buffer_inline_args_impl(current, method, true);
565 JRT_END
566
567 JRT_ENTRY(void, Runtime1::buffer_inline_args_no_receiver(JavaThread* current, Method* method))
568 NOT_PRODUCT(_buffer_inline_args_no_receiver_slowcase_cnt++;)
569 buffer_inline_args_impl(current, method, false);
570 JRT_END
571
572 JRT_ENTRY(void, Runtime1::unimplemented_entry(JavaThread* current, C1StubId id))
573 tty->print_cr("Runtime1::entry_for(%d) returned unimplemented entry point", (int)id);
574 JRT_END
575
576
577 JRT_ENTRY(void, Runtime1::throw_array_store_exception(JavaThread* current, oopDesc* obj))
578 ResourceMark rm(current);
579 const char* klass_name = obj->klass()->external_name();
580 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ArrayStoreException(), klass_name);
581 JRT_END
582
583
584 // counter_overflow() is called from within C1-compiled methods. The enclosing method is the method
585 // associated with the top activation record. The inlinee (that is possibly included in the enclosing
586 // method) method is passed as an argument. In order to do that it is embedded in the code as
587 // a constant.
588 static nmethod* counter_overflow_helper(JavaThread* current, int branch_bci, Method* m) {
589 nmethod* osr_nm = nullptr;
590 methodHandle method(current, m);
591
875 _throw_class_cast_exception_count++;
876 }
877 #endif
878 ResourceMark rm(current);
879 char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
880 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ClassCastException(), message);
881 JRT_END
882
883
884 JRT_ENTRY(void, Runtime1::throw_incompatible_class_change_error(JavaThread* current))
885 #ifndef PRODUCT
886 if (PrintC1Statistics) {
887 _throw_incompatible_class_change_error_count++;
888 }
889 #endif
890 ResourceMark rm(current);
891 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IncompatibleClassChangeError());
892 JRT_END
893
894
895 JRT_ENTRY(void, Runtime1::throw_illegal_monitor_state_exception(JavaThread* current))
896 NOT_PRODUCT(_throw_illegal_monitor_state_exception_count++;)
897 ResourceMark rm(current);
898 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IllegalMonitorStateException());
899 JRT_END
900
901 JRT_ENTRY(void, Runtime1::throw_identity_exception(JavaThread* current, oopDesc* object))
902 NOT_PRODUCT(_throw_identity_exception_count++;)
903 ResourceMark rm(current);
904 char* message = SharedRuntime::generate_identity_exception_message(current, object->klass());
905 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IdentityException(), message);
906 JRT_END
907
908 JRT_BLOCK_ENTRY(void, Runtime1::monitorenter(JavaThread* current, oopDesc* obj, BasicObjectLock* lock))
909 #ifndef PRODUCT
910 if (PrintC1Statistics) {
911 _monitorenter_slowcase_cnt++;
912 }
913 #endif
914 if (LockingMode == LM_MONITOR) {
915 lock->set_obj(obj);
916 }
917 assert(obj == lock->obj(), "must match");
918 SharedRuntime::monitor_enter_helper(obj, lock->lock(), current);
919 JRT_END
920
921
922 JRT_LEAF(void, Runtime1::monitorexit(JavaThread* current, BasicObjectLock* lock))
923 assert(current == JavaThread::current(), "pre-condition");
924 #ifndef PRODUCT
925 if (PrintC1Statistics) {
926 _monitorexit_slowcase_cnt++;
927 }
1093 RegisterMap::WalkContinuation::skip);
1094 frame runtime_frame = current->last_frame();
1095 frame caller_frame = runtime_frame.sender(®_map);
1096
1097 // last java frame on stack
1098 vframeStream vfst(current, true);
1099 assert(!vfst.at_end(), "Java frame must exist");
1100
1101 methodHandle caller_method(current, vfst.method());
1102 // Note that caller_method->code() may not be same as caller_code because of OSR's
1103 // Note also that in the presence of inlining it is not guaranteed
1104 // that caller_method() == caller_code->method()
1105
1106 int bci = vfst.bci();
1107 Bytecodes::Code code = caller_method()->java_code_at(bci);
1108
1109 // this is used by assertions in the access_field_patching_id
1110 BasicType patch_field_type = T_ILLEGAL;
1111 bool deoptimize_for_volatile = false;
1112 bool deoptimize_for_atomic = false;
1113 bool deoptimize_for_null_free = false;
1114 bool deoptimize_for_flat = false;
1115 int patch_field_offset = -1;
1116 Klass* init_klass = nullptr; // klass needed by load_klass_patching code
1117 Klass* load_klass = nullptr; // klass needed by load_klass_patching code
1118 Handle mirror(current, nullptr); // oop needed by load_mirror_patching code
1119 Handle appendix(current, nullptr); // oop needed by appendix_patching code
1120 bool load_klass_or_mirror_patch_id =
1121 (stub_id == C1StubId::load_klass_patching_id || stub_id == C1StubId::load_mirror_patching_id);
1122
1123 if (stub_id == C1StubId::access_field_patching_id) {
1124
1125 Bytecode_field field_access(caller_method, bci);
1126 fieldDescriptor result; // initialize class if needed
1127 Bytecodes::Code code = field_access.code();
1128 constantPoolHandle constants(current, caller_method->constants());
1129 LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK);
1130 patch_field_offset = result.offset();
1131
1132 // If we're patching a field which is volatile then at compile it
1133 // must not have been know to be volatile, so the generated code
1134 // isn't correct for a volatile reference. The nmethod has to be
1138 // used for patching references to oops which don't need special
1139 // handling in the volatile case.
1140
1141 deoptimize_for_volatile = result.access_flags().is_volatile();
1142
1143 // If we are patching a field which should be atomic, then
1144 // the generated code is not correct either, force deoptimizing.
1145 // We need to only cover T_LONG and T_DOUBLE fields, as we can
1146 // break access atomicity only for them.
1147
1148 // Strictly speaking, the deoptimization on 64-bit platforms
1149 // is unnecessary, and T_LONG stores on 32-bit platforms need
1150 // to be handled by special patching code when AlwaysAtomicAccesses
1151 // becomes product feature. At this point, we are still going
1152 // for the deoptimization for consistency against volatile
1153 // accesses.
1154
1155 patch_field_type = result.field_type();
1156 deoptimize_for_atomic = (AlwaysAtomicAccesses && (patch_field_type == T_DOUBLE || patch_field_type == T_LONG));
1157
1158 // The field we are patching is null-free. Deoptimize and regenerate
1159 // the compiled code if we patch a putfield/putstatic because it
1160 // does not contain the required null check.
1161 deoptimize_for_null_free = result.is_null_free_inline_type() && (field_access.is_putfield() || field_access.is_putstatic());
1162
1163 // The field we are patching is flat. Deoptimize and regenerate
1164 // the compiled code which can't handle the layout of the flat
1165 // field because it was unknown at compile time.
1166 deoptimize_for_flat = result.is_flat();
1167
1168 } else if (load_klass_or_mirror_patch_id) {
1169 Klass* k = nullptr;
1170 switch (code) {
1171 case Bytecodes::_putstatic:
1172 case Bytecodes::_getstatic:
1173 { Klass* klass = resolve_field_return_klass(caller_method, bci, CHECK);
1174 init_klass = klass;
1175 mirror = Handle(current, klass->java_mirror());
1176 }
1177 break;
1178 case Bytecodes::_new:
1179 { Bytecode_new bnew(caller_method(), caller_method->bcp_from(bci));
1180 k = caller_method->constants()->klass_at(bnew.index(), CHECK);
1181 }
1182 break;
1183 case Bytecodes::_multianewarray:
1184 { Bytecode_multianewarray mna(caller_method(), caller_method->bcp_from(bci));
1185 k = caller_method->constants()->klass_at(mna.index(), CHECK);
1186 }
1187 break;
1220 CallInfo info;
1221 constantPoolHandle pool(current, caller_method->constants());
1222 int index = bytecode.index();
1223 LinkResolver::resolve_invoke(info, Handle(), pool, index, bc, CHECK);
1224 switch (bc) {
1225 case Bytecodes::_invokehandle: {
1226 ResolvedMethodEntry* entry = pool->cache()->set_method_handle(index, info);
1227 appendix = Handle(current, pool->cache()->appendix_if_resolved(entry));
1228 break;
1229 }
1230 case Bytecodes::_invokedynamic: {
1231 appendix = Handle(current, pool->cache()->set_dynamic_call(info, index));
1232 break;
1233 }
1234 default: fatal("unexpected bytecode for load_appendix_patching_id");
1235 }
1236 } else {
1237 ShouldNotReachHere();
1238 }
1239
1240 if (deoptimize_for_volatile || deoptimize_for_atomic || deoptimize_for_null_free || deoptimize_for_flat) {
1241 // At compile time we assumed the field wasn't volatile/atomic but after
1242 // loading it turns out it was volatile/atomic so we have to throw the
1243 // compiled code out and let it be regenerated.
1244 if (TracePatching) {
1245 if (deoptimize_for_volatile) {
1246 tty->print_cr("Deoptimizing for patching volatile field reference");
1247 }
1248 if (deoptimize_for_atomic) {
1249 tty->print_cr("Deoptimizing for patching atomic field reference");
1250 }
1251 if (deoptimize_for_null_free) {
1252 tty->print_cr("Deoptimizing for patching null-free field reference");
1253 }
1254 if (deoptimize_for_flat) {
1255 tty->print_cr("Deoptimizing for patching flat field reference");
1256 }
1257 }
1258
1259 // It's possible the nmethod was invalidated in the last
1260 // safepoint, but if it's still alive then make it not_entrant.
1261 nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
1262 if (nm != nullptr) {
1263 nm->make_not_entrant("C1 code patch");
1264 }
1265
1266 Deoptimization::deoptimize_frame(current, caller_frame.id());
1267
1268 // Return to the now deoptimized frame.
1269 }
1270
1271 // Now copy code back
1272
1273 {
1274 MutexLocker ml_code (current, CodeCache_lock, Mutex::_no_safepoint_check_flag);
1275 //
1276 // Deoptimization may have happened while we waited for the lock.
1687 #ifndef PRODUCT
1688 void Runtime1::print_statistics() {
1689 tty->print_cr("C1 Runtime statistics:");
1690 tty->print_cr(" _resolve_invoke_virtual_cnt: %u", SharedRuntime::_resolve_virtual_ctr);
1691 tty->print_cr(" _resolve_invoke_opt_virtual_cnt: %u", SharedRuntime::_resolve_opt_virtual_ctr);
1692 tty->print_cr(" _resolve_invoke_static_cnt: %u", SharedRuntime::_resolve_static_ctr);
1693 tty->print_cr(" _handle_wrong_method_cnt: %u", SharedRuntime::_wrong_method_ctr);
1694 tty->print_cr(" _ic_miss_cnt: %u", SharedRuntime::_ic_miss_ctr);
1695 tty->print_cr(" _generic_arraycopystub_cnt: %u", _generic_arraycopystub_cnt);
1696 tty->print_cr(" _byte_arraycopy_cnt: %u", _byte_arraycopy_stub_cnt);
1697 tty->print_cr(" _short_arraycopy_cnt: %u", _short_arraycopy_stub_cnt);
1698 tty->print_cr(" _int_arraycopy_cnt: %u", _int_arraycopy_stub_cnt);
1699 tty->print_cr(" _long_arraycopy_cnt: %u", _long_arraycopy_stub_cnt);
1700 tty->print_cr(" _oop_arraycopy_cnt: %u", _oop_arraycopy_stub_cnt);
1701 tty->print_cr(" _arraycopy_slowcase_cnt: %u", _arraycopy_slowcase_cnt);
1702 tty->print_cr(" _arraycopy_checkcast_cnt: %u", _arraycopy_checkcast_cnt);
1703 tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%u", _arraycopy_checkcast_attempt_cnt);
1704
1705 tty->print_cr(" _new_type_array_slowcase_cnt: %u", _new_type_array_slowcase_cnt);
1706 tty->print_cr(" _new_object_array_slowcase_cnt: %u", _new_object_array_slowcase_cnt);
1707 tty->print_cr(" _new_null_free_array_slowcase_cnt: %u", _new_null_free_array_slowcase_cnt);
1708 tty->print_cr(" _new_instance_slowcase_cnt: %u", _new_instance_slowcase_cnt);
1709 tty->print_cr(" _new_multi_array_slowcase_cnt: %u", _new_multi_array_slowcase_cnt);
1710 tty->print_cr(" _load_flat_array_slowcase_cnt: %u", _load_flat_array_slowcase_cnt);
1711 tty->print_cr(" _store_flat_array_slowcase_cnt: %u", _store_flat_array_slowcase_cnt);
1712 tty->print_cr(" _substitutability_check_slowcase_cnt: %u", _substitutability_check_slowcase_cnt);
1713 tty->print_cr(" _buffer_inline_args_slowcase_cnt:%u", _buffer_inline_args_slowcase_cnt);
1714 tty->print_cr(" _buffer_inline_args_no_receiver_slowcase_cnt:%u", _buffer_inline_args_no_receiver_slowcase_cnt);
1715
1716 tty->print_cr(" _monitorenter_slowcase_cnt: %u", _monitorenter_slowcase_cnt);
1717 tty->print_cr(" _monitorexit_slowcase_cnt: %u", _monitorexit_slowcase_cnt);
1718 tty->print_cr(" _patch_code_slowcase_cnt: %u", _patch_code_slowcase_cnt);
1719
1720 tty->print_cr(" _throw_range_check_exception_count: %u:", _throw_range_check_exception_count);
1721 tty->print_cr(" _throw_index_exception_count: %u:", _throw_index_exception_count);
1722 tty->print_cr(" _throw_div0_exception_count: %u:", _throw_div0_exception_count);
1723 tty->print_cr(" _throw_null_pointer_exception_count: %u:", _throw_null_pointer_exception_count);
1724 tty->print_cr(" _throw_class_cast_exception_count: %u:", _throw_class_cast_exception_count);
1725 tty->print_cr(" _throw_incompatible_class_change_error_count: %u:", _throw_incompatible_class_change_error_count);
1726 tty->print_cr(" _throw_illegal_monitor_state_exception_count: %u:", _throw_illegal_monitor_state_exception_count);
1727 tty->print_cr(" _throw_identity_exception_count: %u:", _throw_identity_exception_count);
1728 tty->print_cr(" _throw_count: %u:", _throw_count);
1729
1730 SharedRuntime::print_ic_miss_histogram();
1731 tty->cr();
1732 }
1733 #endif // PRODUCT
|