36 #include "code/codeBlob.hpp"
37 #include "code/compiledIC.hpp"
38 #include "code/pcDesc.hpp"
39 #include "code/scopeDesc.hpp"
40 #include "code/vtableStubs.hpp"
41 #include "compiler/compilationPolicy.hpp"
42 #include "compiler/disassembler.hpp"
43 #include "compiler/oopMap.hpp"
44 #include "gc/shared/barrierSet.hpp"
45 #include "gc/shared/c1/barrierSetC1.hpp"
46 #include "gc/shared/collectedHeap.hpp"
47 #include "interpreter/bytecode.hpp"
48 #include "interpreter/interpreter.hpp"
49 #include "jfr/support/jfrIntrinsics.hpp"
50 #include "logging/log.hpp"
51 #include "memory/allocation.inline.hpp"
52 #include "memory/oopFactory.hpp"
53 #include "memory/resourceArea.hpp"
54 #include "memory/universe.hpp"
55 #include "oops/access.inline.hpp"
56 #include "oops/klass.inline.hpp"
57 #include "oops/objArrayOop.inline.hpp"
58 #include "oops/objArrayKlass.hpp"
59 #include "oops/oop.inline.hpp"
60 #include "prims/jvmtiExport.hpp"
61 #include "runtime/atomic.hpp"
62 #include "runtime/fieldDescriptor.inline.hpp"
63 #include "runtime/frame.inline.hpp"
64 #include "runtime/handles.inline.hpp"
65 #include "runtime/interfaceSupport.inline.hpp"
66 #include "runtime/javaCalls.hpp"
67 #include "runtime/sharedRuntime.hpp"
68 #include "runtime/stackWatermarkSet.hpp"
69 #include "runtime/stubRoutines.hpp"
70 #include "runtime/threadCritical.hpp"
71 #include "runtime/vframe.inline.hpp"
72 #include "runtime/vframeArray.hpp"
73 #include "runtime/vm_version.hpp"
74 #include "utilities/copy.hpp"
75 #include "utilities/events.hpp"
105 _num_rt_args = args;
106 }
107 assert(_num_rt_args == args, "can't change the number of args");
108 }
109
110 // Implementation of Runtime1
111
112 CodeBlob* Runtime1::_blobs[Runtime1::number_of_ids];
113 const char *Runtime1::_blob_names[] = {
114 RUNTIME1_STUBS(STUB_NAME, LAST_STUB_NAME)
115 };
116
117 #ifndef PRODUCT
118 // statistics
119 uint Runtime1::_generic_arraycopystub_cnt = 0;
120 uint Runtime1::_arraycopy_slowcase_cnt = 0;
121 uint Runtime1::_arraycopy_checkcast_cnt = 0;
122 uint Runtime1::_arraycopy_checkcast_attempt_cnt = 0;
123 uint Runtime1::_new_type_array_slowcase_cnt = 0;
124 uint Runtime1::_new_object_array_slowcase_cnt = 0;
125 uint Runtime1::_new_instance_slowcase_cnt = 0;
126 uint Runtime1::_new_multi_array_slowcase_cnt = 0;
127 uint Runtime1::_monitorenter_slowcase_cnt = 0;
128 uint Runtime1::_monitorexit_slowcase_cnt = 0;
129 uint Runtime1::_patch_code_slowcase_cnt = 0;
130 uint Runtime1::_throw_range_check_exception_count = 0;
131 uint Runtime1::_throw_index_exception_count = 0;
132 uint Runtime1::_throw_div0_exception_count = 0;
133 uint Runtime1::_throw_null_pointer_exception_count = 0;
134 uint Runtime1::_throw_class_cast_exception_count = 0;
135 uint Runtime1::_throw_incompatible_class_change_error_count = 0;
136 uint Runtime1::_throw_count = 0;
137
138 static uint _byte_arraycopy_stub_cnt = 0;
139 static uint _short_arraycopy_stub_cnt = 0;
140 static uint _int_arraycopy_stub_cnt = 0;
141 static uint _long_arraycopy_stub_cnt = 0;
142 static uint _oop_arraycopy_stub_cnt = 0;
143
144 address Runtime1::arraycopy_count_address(BasicType type) {
145 switch (type) {
146 case T_BOOLEAN:
147 case T_BYTE: return (address)&_byte_arraycopy_stub_cnt;
148 case T_CHAR:
149 case T_SHORT: return (address)&_short_arraycopy_stub_cnt;
150 case T_FLOAT:
151 case T_INT: return (address)&_int_arraycopy_stub_cnt;
152 case T_DOUBLE:
153 case T_LONG: return (address)&_long_arraycopy_stub_cnt;
154 case T_ARRAY:
155 case T_OBJECT: return (address)&_oop_arraycopy_stub_cnt;
331 #ifdef JFR_HAVE_INTRINSICS
332 FUNCTION_CASE(entry, JfrTime::time_function());
333 #endif
334 FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32());
335 FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32C());
336 FUNCTION_CASE(entry, StubRoutines::vectorizedMismatch());
337 FUNCTION_CASE(entry, StubRoutines::dexp());
338 FUNCTION_CASE(entry, StubRoutines::dlog());
339 FUNCTION_CASE(entry, StubRoutines::dlog10());
340 FUNCTION_CASE(entry, StubRoutines::dpow());
341 FUNCTION_CASE(entry, StubRoutines::dsin());
342 FUNCTION_CASE(entry, StubRoutines::dcos());
343 FUNCTION_CASE(entry, StubRoutines::dtan());
344
345 #undef FUNCTION_CASE
346
347 // Soft float adds more runtime names.
348 return pd_name_for_address(entry);
349 }
350
351
352 JRT_ENTRY(void, Runtime1::new_instance(JavaThread* current, Klass* klass))
353 #ifndef PRODUCT
354 if (PrintC1Statistics) {
355 _new_instance_slowcase_cnt++;
356 }
357 #endif
358 assert(klass->is_klass(), "not a class");
359 Handle holder(current, klass->klass_holder()); // keep the klass alive
360 InstanceKlass* h = InstanceKlass::cast(klass);
361 h->check_valid_for_instantiation(true, CHECK);
362 // make sure klass is initialized
363 h->initialize(CHECK);
364 // allocate instance and return via TLS
365 oop obj = h->allocate_instance(CHECK);
366 current->set_vm_result(obj);
367 JRT_END
368
369
370 JRT_ENTRY(void, Runtime1::new_type_array(JavaThread* current, Klass* klass, jint length))
371 #ifndef PRODUCT
372 if (PrintC1Statistics) {
373 _new_type_array_slowcase_cnt++;
374 }
375 #endif
376 // Note: no handle for klass needed since they are not used
377 // anymore after new_typeArray() and no GC can happen before.
378 // (This may have to change if this code changes!)
379 assert(klass->is_klass(), "not a class");
380 BasicType elt_type = TypeArrayKlass::cast(klass)->element_type();
381 oop obj = oopFactory::new_typeArray(elt_type, length, CHECK);
382 current->set_vm_result(obj);
383 // This is pretty rare but this runtime patch is stressful to deoptimization
384 // if we deoptimize here so force a deopt to stress the path.
385 if (DeoptimizeALot) {
386 deopt_caller(current);
387 }
388
389 JRT_END
390
391
392 JRT_ENTRY(void, Runtime1::new_object_array(JavaThread* current, Klass* array_klass, jint length))
393 #ifndef PRODUCT
394 if (PrintC1Statistics) {
395 _new_object_array_slowcase_cnt++;
396 }
397 #endif
398 // Note: no handle for klass needed since they are not used
399 // anymore after new_objArray() and no GC can happen before.
400 // (This may have to change if this code changes!)
401 assert(array_klass->is_klass(), "not a class");
402 Handle holder(current, array_klass->klass_holder()); // keep the klass alive
403 Klass* elem_klass = ObjArrayKlass::cast(array_klass)->element_klass();
404 objArrayOop obj = oopFactory::new_objArray(elem_klass, length, CHECK);
405 current->set_vm_result(obj);
406 // This is pretty rare but this runtime patch is stressful to deoptimization
407 // if we deoptimize here so force a deopt to stress the path.
408 if (DeoptimizeALot) {
409 deopt_caller(current);
410 }
411 JRT_END
412
413
414 JRT_ENTRY(void, Runtime1::new_multi_array(JavaThread* current, Klass* klass, int rank, jint* dims))
415 #ifndef PRODUCT
416 if (PrintC1Statistics) {
417 _new_multi_array_slowcase_cnt++;
418 }
419 #endif
420 assert(klass->is_klass(), "not a class");
421 assert(rank >= 1, "rank must be nonzero");
422 Handle holder(current, klass->klass_holder()); // keep the klass alive
423 oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK);
424 current->set_vm_result(obj);
425 JRT_END
426
427
428 JRT_ENTRY(void, Runtime1::unimplemented_entry(JavaThread* current, StubID id))
429 tty->print_cr("Runtime1::entry_for(%d) returned unimplemented entry point", id);
430 JRT_END
431
432
433 JRT_ENTRY(void, Runtime1::throw_array_store_exception(JavaThread* current, oopDesc* obj))
434 ResourceMark rm(current);
435 const char* klass_name = obj->klass()->external_name();
436 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ArrayStoreException(), klass_name);
437 JRT_END
438
439
440 // counter_overflow() is called from within C1-compiled methods. The enclosing method is the method
441 // associated with the top activation record. The inlinee (that is possibly included in the enclosing
442 // method) method is passed as an argument. In order to do that it is embedded in the code as
443 // a constant.
444 static nmethod* counter_overflow_helper(JavaThread* current, int branch_bci, Method* m) {
445 nmethod* osr_nm = nullptr;
446 methodHandle method(current, m);
447
731 _throw_class_cast_exception_count++;
732 }
733 #endif
734 ResourceMark rm(current);
735 char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
736 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ClassCastException(), message);
737 JRT_END
738
739
740 JRT_ENTRY(void, Runtime1::throw_incompatible_class_change_error(JavaThread* current))
741 #ifndef PRODUCT
742 if (PrintC1Statistics) {
743 _throw_incompatible_class_change_error_count++;
744 }
745 #endif
746 ResourceMark rm(current);
747 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IncompatibleClassChangeError());
748 JRT_END
749
750
751 JRT_BLOCK_ENTRY(void, Runtime1::monitorenter(JavaThread* current, oopDesc* obj, BasicObjectLock* lock))
752 #ifndef PRODUCT
753 if (PrintC1Statistics) {
754 _monitorenter_slowcase_cnt++;
755 }
756 #endif
757 if (LockingMode == LM_MONITOR) {
758 lock->set_obj(obj);
759 }
760 assert(obj == lock->obj(), "must match");
761 SharedRuntime::monitor_enter_helper(obj, lock->lock(), current);
762 JRT_END
763
764
765 JRT_LEAF(void, Runtime1::monitorexit(JavaThread* current, BasicObjectLock* lock))
766 assert(current == JavaThread::current(), "pre-condition");
767 #ifndef PRODUCT
768 if (PrintC1Statistics) {
769 _monitorexit_slowcase_cnt++;
770 }
936 RegisterMap::WalkContinuation::skip);
937 frame runtime_frame = current->last_frame();
938 frame caller_frame = runtime_frame.sender(®_map);
939
940 // last java frame on stack
941 vframeStream vfst(current, true);
942 assert(!vfst.at_end(), "Java frame must exist");
943
944 methodHandle caller_method(current, vfst.method());
945 // Note that caller_method->code() may not be same as caller_code because of OSR's
946 // Note also that in the presence of inlining it is not guaranteed
947 // that caller_method() == caller_code->method()
948
949 int bci = vfst.bci();
950 Bytecodes::Code code = caller_method()->java_code_at(bci);
951
952 // this is used by assertions in the access_field_patching_id
953 BasicType patch_field_type = T_ILLEGAL;
954 bool deoptimize_for_volatile = false;
955 bool deoptimize_for_atomic = false;
956 int patch_field_offset = -1;
957 Klass* init_klass = nullptr; // klass needed by load_klass_patching code
958 Klass* load_klass = nullptr; // klass needed by load_klass_patching code
959 Handle mirror(current, nullptr); // oop needed by load_mirror_patching code
960 Handle appendix(current, nullptr); // oop needed by appendix_patching code
961 bool load_klass_or_mirror_patch_id =
962 (stub_id == Runtime1::load_klass_patching_id || stub_id == Runtime1::load_mirror_patching_id);
963
964 if (stub_id == Runtime1::access_field_patching_id) {
965
966 Bytecode_field field_access(caller_method, bci);
967 fieldDescriptor result; // initialize class if needed
968 Bytecodes::Code code = field_access.code();
969 constantPoolHandle constants(current, caller_method->constants());
970 LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK);
971 patch_field_offset = result.offset();
972
973 // If we're patching a field which is volatile then at compile it
974 // must not have been know to be volatile, so the generated code
975 // isn't correct for a volatile reference. The nmethod has to be
979 // used for patching references to oops which don't need special
980 // handling in the volatile case.
981
982 deoptimize_for_volatile = result.access_flags().is_volatile();
983
984 // If we are patching a field which should be atomic, then
985 // the generated code is not correct either, force deoptimizing.
986 // We need to only cover T_LONG and T_DOUBLE fields, as we can
987 // break access atomicity only for them.
988
989 // Strictly speaking, the deoptimization on 64-bit platforms
990 // is unnecessary, and T_LONG stores on 32-bit platforms need
991 // to be handled by special patching code when AlwaysAtomicAccesses
992 // becomes product feature. At this point, we are still going
993 // for the deoptimization for consistency against volatile
994 // accesses.
995
996 patch_field_type = result.field_type();
997 deoptimize_for_atomic = (AlwaysAtomicAccesses && (patch_field_type == T_DOUBLE || patch_field_type == T_LONG));
998
999 } else if (load_klass_or_mirror_patch_id) {
1000 Klass* k = nullptr;
1001 switch (code) {
1002 case Bytecodes::_putstatic:
1003 case Bytecodes::_getstatic:
1004 { Klass* klass = resolve_field_return_klass(caller_method, bci, CHECK);
1005 init_klass = klass;
1006 mirror = Handle(current, klass->java_mirror());
1007 }
1008 break;
1009 case Bytecodes::_new:
1010 { Bytecode_new bnew(caller_method(), caller_method->bcp_from(bci));
1011 k = caller_method->constants()->klass_at(bnew.index(), CHECK);
1012 }
1013 break;
1014 case Bytecodes::_multianewarray:
1015 { Bytecode_multianewarray mna(caller_method(), caller_method->bcp_from(bci));
1016 k = caller_method->constants()->klass_at(mna.index(), CHECK);
1017 }
1018 break;
1051 CallInfo info;
1052 constantPoolHandle pool(current, caller_method->constants());
1053 int index = bytecode.index();
1054 LinkResolver::resolve_invoke(info, Handle(), pool, index, bc, CHECK);
1055 switch (bc) {
1056 case Bytecodes::_invokehandle: {
1057 ResolvedMethodEntry* entry = pool->cache()->set_method_handle(index, info);
1058 appendix = Handle(current, pool->cache()->appendix_if_resolved(entry));
1059 break;
1060 }
1061 case Bytecodes::_invokedynamic: {
1062 appendix = Handle(current, pool->cache()->set_dynamic_call(info, index));
1063 break;
1064 }
1065 default: fatal("unexpected bytecode for load_appendix_patching_id");
1066 }
1067 } else {
1068 ShouldNotReachHere();
1069 }
1070
1071 if (deoptimize_for_volatile || deoptimize_for_atomic) {
1072 // At compile time we assumed the field wasn't volatile/atomic but after
1073 // loading it turns out it was volatile/atomic so we have to throw the
1074 // compiled code out and let it be regenerated.
1075 if (TracePatching) {
1076 if (deoptimize_for_volatile) {
1077 tty->print_cr("Deoptimizing for patching volatile field reference");
1078 }
1079 if (deoptimize_for_atomic) {
1080 tty->print_cr("Deoptimizing for patching atomic field reference");
1081 }
1082 }
1083
1084 // It's possible the nmethod was invalidated in the last
1085 // safepoint, but if it's still alive then make it not_entrant.
1086 nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
1087 if (nm != nullptr) {
1088 nm->make_not_entrant();
1089 }
1090
1091 Deoptimization::deoptimize_frame(current, caller_frame.id());
1092
1093 // Return to the now deoptimized frame.
1094 }
1095
1096 // Now copy code back
1097
1098 {
1099 MutexLocker ml_patch (current, Patching_lock, Mutex::_no_safepoint_check_flag);
1100 //
1101 // Deoptimization may have happened while we waited for the lock.
1516 #ifndef PRODUCT
1517 void Runtime1::print_statistics() {
1518 tty->print_cr("C1 Runtime statistics:");
1519 tty->print_cr(" _resolve_invoke_virtual_cnt: %u", SharedRuntime::_resolve_virtual_ctr);
1520 tty->print_cr(" _resolve_invoke_opt_virtual_cnt: %u", SharedRuntime::_resolve_opt_virtual_ctr);
1521 tty->print_cr(" _resolve_invoke_static_cnt: %u", SharedRuntime::_resolve_static_ctr);
1522 tty->print_cr(" _handle_wrong_method_cnt: %u", SharedRuntime::_wrong_method_ctr);
1523 tty->print_cr(" _ic_miss_cnt: %u", SharedRuntime::_ic_miss_ctr);
1524 tty->print_cr(" _generic_arraycopystub_cnt: %u", _generic_arraycopystub_cnt);
1525 tty->print_cr(" _byte_arraycopy_cnt: %u", _byte_arraycopy_stub_cnt);
1526 tty->print_cr(" _short_arraycopy_cnt: %u", _short_arraycopy_stub_cnt);
1527 tty->print_cr(" _int_arraycopy_cnt: %u", _int_arraycopy_stub_cnt);
1528 tty->print_cr(" _long_arraycopy_cnt: %u", _long_arraycopy_stub_cnt);
1529 tty->print_cr(" _oop_arraycopy_cnt: %u", _oop_arraycopy_stub_cnt);
1530 tty->print_cr(" _arraycopy_slowcase_cnt: %u", _arraycopy_slowcase_cnt);
1531 tty->print_cr(" _arraycopy_checkcast_cnt: %u", _arraycopy_checkcast_cnt);
1532 tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%u", _arraycopy_checkcast_attempt_cnt);
1533
1534 tty->print_cr(" _new_type_array_slowcase_cnt: %u", _new_type_array_slowcase_cnt);
1535 tty->print_cr(" _new_object_array_slowcase_cnt: %u", _new_object_array_slowcase_cnt);
1536 tty->print_cr(" _new_instance_slowcase_cnt: %u", _new_instance_slowcase_cnt);
1537 tty->print_cr(" _new_multi_array_slowcase_cnt: %u", _new_multi_array_slowcase_cnt);
1538 tty->print_cr(" _monitorenter_slowcase_cnt: %u", _monitorenter_slowcase_cnt);
1539 tty->print_cr(" _monitorexit_slowcase_cnt: %u", _monitorexit_slowcase_cnt);
1540 tty->print_cr(" _patch_code_slowcase_cnt: %u", _patch_code_slowcase_cnt);
1541
1542 tty->print_cr(" _throw_range_check_exception_count: %u:", _throw_range_check_exception_count);
1543 tty->print_cr(" _throw_index_exception_count: %u:", _throw_index_exception_count);
1544 tty->print_cr(" _throw_div0_exception_count: %u:", _throw_div0_exception_count);
1545 tty->print_cr(" _throw_null_pointer_exception_count: %u:", _throw_null_pointer_exception_count);
1546 tty->print_cr(" _throw_class_cast_exception_count: %u:", _throw_class_cast_exception_count);
1547 tty->print_cr(" _throw_incompatible_class_change_error_count: %u:", _throw_incompatible_class_change_error_count);
1548 tty->print_cr(" _throw_count: %u:", _throw_count);
1549
1550 SharedRuntime::print_ic_miss_histogram();
1551 tty->cr();
1552 }
1553 #endif // PRODUCT
|
36 #include "code/codeBlob.hpp"
37 #include "code/compiledIC.hpp"
38 #include "code/pcDesc.hpp"
39 #include "code/scopeDesc.hpp"
40 #include "code/vtableStubs.hpp"
41 #include "compiler/compilationPolicy.hpp"
42 #include "compiler/disassembler.hpp"
43 #include "compiler/oopMap.hpp"
44 #include "gc/shared/barrierSet.hpp"
45 #include "gc/shared/c1/barrierSetC1.hpp"
46 #include "gc/shared/collectedHeap.hpp"
47 #include "interpreter/bytecode.hpp"
48 #include "interpreter/interpreter.hpp"
49 #include "jfr/support/jfrIntrinsics.hpp"
50 #include "logging/log.hpp"
51 #include "memory/allocation.inline.hpp"
52 #include "memory/oopFactory.hpp"
53 #include "memory/resourceArea.hpp"
54 #include "memory/universe.hpp"
55 #include "oops/access.inline.hpp"
56 #include "oops/flatArrayKlass.hpp"
57 #include "oops/flatArrayOop.inline.hpp"
58 #include "oops/klass.inline.hpp"
59 #include "oops/objArrayOop.inline.hpp"
60 #include "oops/objArrayKlass.hpp"
61 #include "oops/oop.inline.hpp"
62 #include "prims/jvmtiExport.hpp"
63 #include "runtime/atomic.hpp"
64 #include "runtime/fieldDescriptor.inline.hpp"
65 #include "runtime/frame.inline.hpp"
66 #include "runtime/handles.inline.hpp"
67 #include "runtime/interfaceSupport.inline.hpp"
68 #include "runtime/javaCalls.hpp"
69 #include "runtime/sharedRuntime.hpp"
70 #include "runtime/stackWatermarkSet.hpp"
71 #include "runtime/stubRoutines.hpp"
72 #include "runtime/threadCritical.hpp"
73 #include "runtime/vframe.inline.hpp"
74 #include "runtime/vframeArray.hpp"
75 #include "runtime/vm_version.hpp"
76 #include "utilities/copy.hpp"
77 #include "utilities/events.hpp"
107 _num_rt_args = args;
108 }
109 assert(_num_rt_args == args, "can't change the number of args");
110 }
111
112 // Implementation of Runtime1
113
114 CodeBlob* Runtime1::_blobs[Runtime1::number_of_ids];
115 const char *Runtime1::_blob_names[] = {
116 RUNTIME1_STUBS(STUB_NAME, LAST_STUB_NAME)
117 };
118
119 #ifndef PRODUCT
120 // statistics
121 uint Runtime1::_generic_arraycopystub_cnt = 0;
122 uint Runtime1::_arraycopy_slowcase_cnt = 0;
123 uint Runtime1::_arraycopy_checkcast_cnt = 0;
124 uint Runtime1::_arraycopy_checkcast_attempt_cnt = 0;
125 uint Runtime1::_new_type_array_slowcase_cnt = 0;
126 uint Runtime1::_new_object_array_slowcase_cnt = 0;
127 uint Runtime1::_new_null_free_array_slowcase_cnt = 0;
128 uint Runtime1::_new_instance_slowcase_cnt = 0;
129 uint Runtime1::_new_multi_array_slowcase_cnt = 0;
130 uint Runtime1::_load_flat_array_slowcase_cnt = 0;
131 uint Runtime1::_store_flat_array_slowcase_cnt = 0;
132 uint Runtime1::_substitutability_check_slowcase_cnt = 0;
133 uint Runtime1::_buffer_inline_args_slowcase_cnt = 0;
134 uint Runtime1::_buffer_inline_args_no_receiver_slowcase_cnt = 0;
135 uint Runtime1::_monitorenter_slowcase_cnt = 0;
136 uint Runtime1::_monitorexit_slowcase_cnt = 0;
137 uint Runtime1::_patch_code_slowcase_cnt = 0;
138 uint Runtime1::_throw_range_check_exception_count = 0;
139 uint Runtime1::_throw_index_exception_count = 0;
140 uint Runtime1::_throw_div0_exception_count = 0;
141 uint Runtime1::_throw_null_pointer_exception_count = 0;
142 uint Runtime1::_throw_class_cast_exception_count = 0;
143 uint Runtime1::_throw_incompatible_class_change_error_count = 0;
144 uint Runtime1::_throw_illegal_monitor_state_exception_count = 0;
145 uint Runtime1::_throw_identity_exception_count = 0;
146 uint Runtime1::_throw_count = 0;
147
148 static uint _byte_arraycopy_stub_cnt = 0;
149 static uint _short_arraycopy_stub_cnt = 0;
150 static uint _int_arraycopy_stub_cnt = 0;
151 static uint _long_arraycopy_stub_cnt = 0;
152 static uint _oop_arraycopy_stub_cnt = 0;
153
154 address Runtime1::arraycopy_count_address(BasicType type) {
155 switch (type) {
156 case T_BOOLEAN:
157 case T_BYTE: return (address)&_byte_arraycopy_stub_cnt;
158 case T_CHAR:
159 case T_SHORT: return (address)&_short_arraycopy_stub_cnt;
160 case T_FLOAT:
161 case T_INT: return (address)&_int_arraycopy_stub_cnt;
162 case T_DOUBLE:
163 case T_LONG: return (address)&_long_arraycopy_stub_cnt;
164 case T_ARRAY:
165 case T_OBJECT: return (address)&_oop_arraycopy_stub_cnt;
341 #ifdef JFR_HAVE_INTRINSICS
342 FUNCTION_CASE(entry, JfrTime::time_function());
343 #endif
344 FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32());
345 FUNCTION_CASE(entry, StubRoutines::updateBytesCRC32C());
346 FUNCTION_CASE(entry, StubRoutines::vectorizedMismatch());
347 FUNCTION_CASE(entry, StubRoutines::dexp());
348 FUNCTION_CASE(entry, StubRoutines::dlog());
349 FUNCTION_CASE(entry, StubRoutines::dlog10());
350 FUNCTION_CASE(entry, StubRoutines::dpow());
351 FUNCTION_CASE(entry, StubRoutines::dsin());
352 FUNCTION_CASE(entry, StubRoutines::dcos());
353 FUNCTION_CASE(entry, StubRoutines::dtan());
354
355 #undef FUNCTION_CASE
356
357 // Soft float adds more runtime names.
358 return pd_name_for_address(entry);
359 }
360
361 static void allocate_instance(JavaThread* current, Klass* klass, TRAPS) {
362 #ifndef PRODUCT
363 if (PrintC1Statistics) {
364 Runtime1::_new_instance_slowcase_cnt++;
365 }
366 #endif
367 assert(klass->is_klass(), "not a class");
368 Handle holder(current, klass->klass_holder()); // keep the klass alive
369 InstanceKlass* h = InstanceKlass::cast(klass);
370 h->check_valid_for_instantiation(true, CHECK);
371 // make sure klass is initialized
372 h->initialize(CHECK);
373 oop obj = nullptr;
374 if (h->is_empty_inline_type()) {
375 obj = InlineKlass::cast(h)->default_value();
376 assert(obj != nullptr, "default value must exist");
377 } else {
378 // allocate instance and return via TLS
379 obj = h->allocate_instance(CHECK);
380 }
381 current->set_vm_result(obj);
382 JRT_END
383
384 JRT_ENTRY(void, Runtime1::new_instance(JavaThread* current, Klass* klass))
385 allocate_instance(current, klass, CHECK);
386 JRT_END
387
388 JRT_ENTRY(void, Runtime1::new_type_array(JavaThread* current, Klass* klass, jint length))
389 #ifndef PRODUCT
390 if (PrintC1Statistics) {
391 _new_type_array_slowcase_cnt++;
392 }
393 #endif
394 // Note: no handle for klass needed since they are not used
395 // anymore after new_typeArray() and no GC can happen before.
396 // (This may have to change if this code changes!)
397 assert(klass->is_klass(), "not a class");
398 BasicType elt_type = TypeArrayKlass::cast(klass)->element_type();
399 oop obj = oopFactory::new_typeArray(elt_type, length, CHECK);
400 current->set_vm_result(obj);
401 // This is pretty rare but this runtime patch is stressful to deoptimization
402 // if we deoptimize here so force a deopt to stress the path.
403 if (DeoptimizeALot) {
404 deopt_caller(current);
405 }
406
407 JRT_END
408
409
410 JRT_ENTRY(void, Runtime1::new_object_array(JavaThread* current, Klass* array_klass, jint length))
411 #ifndef PRODUCT
412 if (PrintC1Statistics) {
413 _new_object_array_slowcase_cnt++;
414 }
415 #endif
416 // Note: no handle for klass needed since they are not used
417 // anymore after new_objArray() and no GC can happen before.
418 // (This may have to change if this code changes!)
419 assert(array_klass->is_klass(), "not a class");
420 Handle holder(current, array_klass->klass_holder()); // keep the klass alive
421 Klass* elem_klass = ArrayKlass::cast(array_klass)->element_klass();
422 objArrayOop obj = oopFactory::new_objArray(elem_klass, length, CHECK);
423 current->set_vm_result(obj);
424 // This is pretty rare but this runtime patch is stressful to deoptimization
425 // if we deoptimize here so force a deopt to stress the path.
426 if (DeoptimizeALot) {
427 deopt_caller(current);
428 }
429 JRT_END
430
431
432 JRT_ENTRY(void, Runtime1::new_null_free_array(JavaThread* current, Klass* array_klass, jint length))
433 NOT_PRODUCT(_new_null_free_array_slowcase_cnt++;)
434
435 // Note: no handle for klass needed since they are not used
436 // anymore after new_objArray() and no GC can happen before.
437 // (This may have to change if this code changes!)
438 assert(array_klass->is_klass(), "not a class");
439 Handle holder(THREAD, array_klass->klass_holder()); // keep the klass alive
440 Klass* elem_klass = ArrayKlass::cast(array_klass)->element_klass();
441 assert(elem_klass->is_inline_klass(), "must be");
442 // Logically creates elements, ensure klass init
443 elem_klass->initialize(CHECK);
444 arrayOop obj = oopFactory::new_valueArray(elem_klass, length, CHECK);
445 current->set_vm_result(obj);
446 // This is pretty rare but this runtime patch is stressful to deoptimization
447 // if we deoptimize here so force a deopt to stress the path.
448 if (DeoptimizeALot) {
449 deopt_caller(current);
450 }
451 JRT_END
452
453
454 JRT_ENTRY(void, Runtime1::new_multi_array(JavaThread* current, Klass* klass, int rank, jint* dims))
455 #ifndef PRODUCT
456 if (PrintC1Statistics) {
457 _new_multi_array_slowcase_cnt++;
458 }
459 #endif
460 assert(klass->is_klass(), "not a class");
461 assert(rank >= 1, "rank must be nonzero");
462 Handle holder(current, klass->klass_holder()); // keep the klass alive
463 oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK);
464 current->set_vm_result(obj);
465 JRT_END
466
467
468 static void profile_flat_array(JavaThread* current, bool load) {
469 ResourceMark rm(current);
470 vframeStream vfst(current, true);
471 assert(!vfst.at_end(), "Java frame must exist");
472 // Check if array access profiling is enabled
473 if (vfst.nm()->comp_level() != CompLevel_full_profile || !C1UpdateMethodData) {
474 return;
475 }
476 int bci = vfst.bci();
477 Method* method = vfst.method();
478 MethodData* md = method->method_data();
479 if (md != nullptr) {
480 // Lock to access ProfileData, and ensure lock is not broken by a safepoint
481 MutexLocker ml(md->extra_data_lock(), Mutex::_no_safepoint_check_flag);
482
483 ProfileData* data = md->bci_to_data(bci);
484 assert(data != nullptr, "incorrect profiling entry");
485 if (data->is_ArrayLoadData()) {
486 assert(load, "should be an array load");
487 ArrayLoadData* load_data = (ArrayLoadData*) data;
488 load_data->set_flat_array();
489 } else {
490 assert(data->is_ArrayStoreData(), "");
491 assert(!load, "should be an array store");
492 ArrayStoreData* store_data = (ArrayStoreData*) data;
493 store_data->set_flat_array();
494 }
495 }
496 }
497
498 JRT_ENTRY(void, Runtime1::load_flat_array(JavaThread* current, flatArrayOopDesc* array, int index))
499 assert(array->klass()->is_flatArray_klass(), "should not be called");
500 profile_flat_array(current, true);
501
502 NOT_PRODUCT(_load_flat_array_slowcase_cnt++;)
503 assert(array->length() > 0 && index < array->length(), "already checked");
504 flatArrayHandle vah(current, array);
505 oop obj = flatArrayOopDesc::value_alloc_copy_from_index(vah, index, CHECK);
506 current->set_vm_result(obj);
507 JRT_END
508
509
510 JRT_ENTRY(void, Runtime1::store_flat_array(JavaThread* current, flatArrayOopDesc* array, int index, oopDesc* value))
511 if (array->klass()->is_flatArray_klass()) {
512 profile_flat_array(current, false);
513 }
514
515 NOT_PRODUCT(_store_flat_array_slowcase_cnt++;)
516 if (value == nullptr) {
517 assert(array->klass()->is_flatArray_klass() || array->klass()->is_null_free_array_klass(), "should not be called");
518 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_NullPointerException());
519 } else {
520 assert(array->klass()->is_flatArray_klass(), "should not be called");
521 array->value_copy_to_index(value, index);
522 }
523 JRT_END
524
525
526 JRT_ENTRY(int, Runtime1::substitutability_check(JavaThread* current, oopDesc* left, oopDesc* right))
527 NOT_PRODUCT(_substitutability_check_slowcase_cnt++;)
528 JavaCallArguments args;
529 args.push_oop(Handle(THREAD, left));
530 args.push_oop(Handle(THREAD, right));
531 JavaValue result(T_BOOLEAN);
532 JavaCalls::call_static(&result,
533 vmClasses::ValueObjectMethods_klass(),
534 vmSymbols::isSubstitutable_name(),
535 vmSymbols::object_object_boolean_signature(),
536 &args, CHECK_0);
537 return result.get_jboolean() ? 1 : 0;
538 JRT_END
539
540
541 extern "C" void ps();
542
543 void Runtime1::buffer_inline_args_impl(JavaThread* current, Method* m, bool allocate_receiver) {
544 JavaThread* THREAD = current;
545 methodHandle method(current, m); // We are inside the verified_entry or verified_inline_ro_entry of this method.
546 oop obj = SharedRuntime::allocate_inline_types_impl(current, method, allocate_receiver, CHECK);
547 current->set_vm_result(obj);
548 }
549
550 JRT_ENTRY(void, Runtime1::buffer_inline_args(JavaThread* current, Method* method))
551 NOT_PRODUCT(_buffer_inline_args_slowcase_cnt++;)
552 buffer_inline_args_impl(current, method, true);
553 JRT_END
554
555 JRT_ENTRY(void, Runtime1::buffer_inline_args_no_receiver(JavaThread* current, Method* method))
556 NOT_PRODUCT(_buffer_inline_args_no_receiver_slowcase_cnt++;)
557 buffer_inline_args_impl(current, method, false);
558 JRT_END
559
560 JRT_ENTRY(void, Runtime1::unimplemented_entry(JavaThread* current, StubID id))
561 tty->print_cr("Runtime1::entry_for(%d) returned unimplemented entry point", id);
562 JRT_END
563
564
565 JRT_ENTRY(void, Runtime1::throw_array_store_exception(JavaThread* current, oopDesc* obj))
566 ResourceMark rm(current);
567 const char* klass_name = obj->klass()->external_name();
568 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ArrayStoreException(), klass_name);
569 JRT_END
570
571
572 // counter_overflow() is called from within C1-compiled methods. The enclosing method is the method
573 // associated with the top activation record. The inlinee (that is possibly included in the enclosing
574 // method) method is passed as an argument. In order to do that it is embedded in the code as
575 // a constant.
576 static nmethod* counter_overflow_helper(JavaThread* current, int branch_bci, Method* m) {
577 nmethod* osr_nm = nullptr;
578 methodHandle method(current, m);
579
863 _throw_class_cast_exception_count++;
864 }
865 #endif
866 ResourceMark rm(current);
867 char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
868 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_ClassCastException(), message);
869 JRT_END
870
871
872 JRT_ENTRY(void, Runtime1::throw_incompatible_class_change_error(JavaThread* current))
873 #ifndef PRODUCT
874 if (PrintC1Statistics) {
875 _throw_incompatible_class_change_error_count++;
876 }
877 #endif
878 ResourceMark rm(current);
879 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IncompatibleClassChangeError());
880 JRT_END
881
882
883 JRT_ENTRY(void, Runtime1::throw_illegal_monitor_state_exception(JavaThread* current))
884 NOT_PRODUCT(_throw_illegal_monitor_state_exception_count++;)
885 ResourceMark rm(current);
886 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IllegalMonitorStateException());
887 JRT_END
888
889 JRT_ENTRY(void, Runtime1::throw_identity_exception(JavaThread* current, oopDesc* object))
890 NOT_PRODUCT(_throw_identity_exception_count++;)
891 ResourceMark rm(current);
892 char* message = SharedRuntime::generate_identity_exception_message(current, object->klass());
893 SharedRuntime::throw_and_post_jvmti_exception(current, vmSymbols::java_lang_IdentityException(), message);
894 JRT_END
895
896 JRT_BLOCK_ENTRY(void, Runtime1::monitorenter(JavaThread* current, oopDesc* obj, BasicObjectLock* lock))
897 #ifndef PRODUCT
898 if (PrintC1Statistics) {
899 _monitorenter_slowcase_cnt++;
900 }
901 #endif
902 if (LockingMode == LM_MONITOR) {
903 lock->set_obj(obj);
904 }
905 assert(obj == lock->obj(), "must match");
906 SharedRuntime::monitor_enter_helper(obj, lock->lock(), current);
907 JRT_END
908
909
910 JRT_LEAF(void, Runtime1::monitorexit(JavaThread* current, BasicObjectLock* lock))
911 assert(current == JavaThread::current(), "pre-condition");
912 #ifndef PRODUCT
913 if (PrintC1Statistics) {
914 _monitorexit_slowcase_cnt++;
915 }
1081 RegisterMap::WalkContinuation::skip);
1082 frame runtime_frame = current->last_frame();
1083 frame caller_frame = runtime_frame.sender(®_map);
1084
1085 // last java frame on stack
1086 vframeStream vfst(current, true);
1087 assert(!vfst.at_end(), "Java frame must exist");
1088
1089 methodHandle caller_method(current, vfst.method());
1090 // Note that caller_method->code() may not be same as caller_code because of OSR's
1091 // Note also that in the presence of inlining it is not guaranteed
1092 // that caller_method() == caller_code->method()
1093
1094 int bci = vfst.bci();
1095 Bytecodes::Code code = caller_method()->java_code_at(bci);
1096
1097 // this is used by assertions in the access_field_patching_id
1098 BasicType patch_field_type = T_ILLEGAL;
1099 bool deoptimize_for_volatile = false;
1100 bool deoptimize_for_atomic = false;
1101 bool deoptimize_for_null_free = false;
1102 bool deoptimize_for_flat = false;
1103 int patch_field_offset = -1;
1104 Klass* init_klass = nullptr; // klass needed by load_klass_patching code
1105 Klass* load_klass = nullptr; // klass needed by load_klass_patching code
1106 Handle mirror(current, nullptr); // oop needed by load_mirror_patching code
1107 Handle appendix(current, nullptr); // oop needed by appendix_patching code
1108 bool load_klass_or_mirror_patch_id =
1109 (stub_id == Runtime1::load_klass_patching_id || stub_id == Runtime1::load_mirror_patching_id);
1110
1111 if (stub_id == Runtime1::access_field_patching_id) {
1112
1113 Bytecode_field field_access(caller_method, bci);
1114 fieldDescriptor result; // initialize class if needed
1115 Bytecodes::Code code = field_access.code();
1116 constantPoolHandle constants(current, caller_method->constants());
1117 LinkResolver::resolve_field_access(result, constants, field_access.index(), caller_method, Bytecodes::java_code(code), CHECK);
1118 patch_field_offset = result.offset();
1119
1120 // If we're patching a field which is volatile then at compile it
1121 // must not have been know to be volatile, so the generated code
1122 // isn't correct for a volatile reference. The nmethod has to be
1126 // used for patching references to oops which don't need special
1127 // handling in the volatile case.
1128
1129 deoptimize_for_volatile = result.access_flags().is_volatile();
1130
1131 // If we are patching a field which should be atomic, then
1132 // the generated code is not correct either, force deoptimizing.
1133 // We need to only cover T_LONG and T_DOUBLE fields, as we can
1134 // break access atomicity only for them.
1135
1136 // Strictly speaking, the deoptimization on 64-bit platforms
1137 // is unnecessary, and T_LONG stores on 32-bit platforms need
1138 // to be handled by special patching code when AlwaysAtomicAccesses
1139 // becomes product feature. At this point, we are still going
1140 // for the deoptimization for consistency against volatile
1141 // accesses.
1142
1143 patch_field_type = result.field_type();
1144 deoptimize_for_atomic = (AlwaysAtomicAccesses && (patch_field_type == T_DOUBLE || patch_field_type == T_LONG));
1145
1146 // The field we are patching is null-free. Deoptimize and regenerate
1147 // the compiled code if we patch a putfield/putstatic because it
1148 // does not contain the required null check.
1149 deoptimize_for_null_free = result.is_null_free_inline_type() && (field_access.is_putfield() || field_access.is_putstatic());
1150
1151 // The field we are patching is flat. Deoptimize and regenerate
1152 // the compiled code which can't handle the layout of the flat
1153 // field because it was unknown at compile time.
1154 deoptimize_for_flat = result.is_flat();
1155
1156 } else if (load_klass_or_mirror_patch_id) {
1157 Klass* k = nullptr;
1158 switch (code) {
1159 case Bytecodes::_putstatic:
1160 case Bytecodes::_getstatic:
1161 { Klass* klass = resolve_field_return_klass(caller_method, bci, CHECK);
1162 init_klass = klass;
1163 mirror = Handle(current, klass->java_mirror());
1164 }
1165 break;
1166 case Bytecodes::_new:
1167 { Bytecode_new bnew(caller_method(), caller_method->bcp_from(bci));
1168 k = caller_method->constants()->klass_at(bnew.index(), CHECK);
1169 }
1170 break;
1171 case Bytecodes::_multianewarray:
1172 { Bytecode_multianewarray mna(caller_method(), caller_method->bcp_from(bci));
1173 k = caller_method->constants()->klass_at(mna.index(), CHECK);
1174 }
1175 break;
1208 CallInfo info;
1209 constantPoolHandle pool(current, caller_method->constants());
1210 int index = bytecode.index();
1211 LinkResolver::resolve_invoke(info, Handle(), pool, index, bc, CHECK);
1212 switch (bc) {
1213 case Bytecodes::_invokehandle: {
1214 ResolvedMethodEntry* entry = pool->cache()->set_method_handle(index, info);
1215 appendix = Handle(current, pool->cache()->appendix_if_resolved(entry));
1216 break;
1217 }
1218 case Bytecodes::_invokedynamic: {
1219 appendix = Handle(current, pool->cache()->set_dynamic_call(info, index));
1220 break;
1221 }
1222 default: fatal("unexpected bytecode for load_appendix_patching_id");
1223 }
1224 } else {
1225 ShouldNotReachHere();
1226 }
1227
1228 if (deoptimize_for_volatile || deoptimize_for_atomic || deoptimize_for_null_free || deoptimize_for_flat) {
1229 // At compile time we assumed the field wasn't volatile/atomic but after
1230 // loading it turns out it was volatile/atomic so we have to throw the
1231 // compiled code out and let it be regenerated.
1232 if (TracePatching) {
1233 if (deoptimize_for_volatile) {
1234 tty->print_cr("Deoptimizing for patching volatile field reference");
1235 }
1236 if (deoptimize_for_atomic) {
1237 tty->print_cr("Deoptimizing for patching atomic field reference");
1238 }
1239 if (deoptimize_for_null_free) {
1240 tty->print_cr("Deoptimizing for patching null-free field reference");
1241 }
1242 if (deoptimize_for_flat) {
1243 tty->print_cr("Deoptimizing for patching flat field reference");
1244 }
1245 }
1246
1247 // It's possible the nmethod was invalidated in the last
1248 // safepoint, but if it's still alive then make it not_entrant.
1249 nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
1250 if (nm != nullptr) {
1251 nm->make_not_entrant();
1252 }
1253
1254 Deoptimization::deoptimize_frame(current, caller_frame.id());
1255
1256 // Return to the now deoptimized frame.
1257 }
1258
1259 // Now copy code back
1260
1261 {
1262 MutexLocker ml_patch (current, Patching_lock, Mutex::_no_safepoint_check_flag);
1263 //
1264 // Deoptimization may have happened while we waited for the lock.
1679 #ifndef PRODUCT
1680 void Runtime1::print_statistics() {
1681 tty->print_cr("C1 Runtime statistics:");
1682 tty->print_cr(" _resolve_invoke_virtual_cnt: %u", SharedRuntime::_resolve_virtual_ctr);
1683 tty->print_cr(" _resolve_invoke_opt_virtual_cnt: %u", SharedRuntime::_resolve_opt_virtual_ctr);
1684 tty->print_cr(" _resolve_invoke_static_cnt: %u", SharedRuntime::_resolve_static_ctr);
1685 tty->print_cr(" _handle_wrong_method_cnt: %u", SharedRuntime::_wrong_method_ctr);
1686 tty->print_cr(" _ic_miss_cnt: %u", SharedRuntime::_ic_miss_ctr);
1687 tty->print_cr(" _generic_arraycopystub_cnt: %u", _generic_arraycopystub_cnt);
1688 tty->print_cr(" _byte_arraycopy_cnt: %u", _byte_arraycopy_stub_cnt);
1689 tty->print_cr(" _short_arraycopy_cnt: %u", _short_arraycopy_stub_cnt);
1690 tty->print_cr(" _int_arraycopy_cnt: %u", _int_arraycopy_stub_cnt);
1691 tty->print_cr(" _long_arraycopy_cnt: %u", _long_arraycopy_stub_cnt);
1692 tty->print_cr(" _oop_arraycopy_cnt: %u", _oop_arraycopy_stub_cnt);
1693 tty->print_cr(" _arraycopy_slowcase_cnt: %u", _arraycopy_slowcase_cnt);
1694 tty->print_cr(" _arraycopy_checkcast_cnt: %u", _arraycopy_checkcast_cnt);
1695 tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%u", _arraycopy_checkcast_attempt_cnt);
1696
1697 tty->print_cr(" _new_type_array_slowcase_cnt: %u", _new_type_array_slowcase_cnt);
1698 tty->print_cr(" _new_object_array_slowcase_cnt: %u", _new_object_array_slowcase_cnt);
1699 tty->print_cr(" _new_null_free_array_slowcase_cnt: %u", _new_null_free_array_slowcase_cnt);
1700 tty->print_cr(" _new_instance_slowcase_cnt: %u", _new_instance_slowcase_cnt);
1701 tty->print_cr(" _new_multi_array_slowcase_cnt: %u", _new_multi_array_slowcase_cnt);
1702 tty->print_cr(" _load_flat_array_slowcase_cnt: %u", _load_flat_array_slowcase_cnt);
1703 tty->print_cr(" _store_flat_array_slowcase_cnt: %u", _store_flat_array_slowcase_cnt);
1704 tty->print_cr(" _substitutability_check_slowcase_cnt: %u", _substitutability_check_slowcase_cnt);
1705 tty->print_cr(" _buffer_inline_args_slowcase_cnt:%u", _buffer_inline_args_slowcase_cnt);
1706 tty->print_cr(" _buffer_inline_args_no_receiver_slowcase_cnt:%u", _buffer_inline_args_no_receiver_slowcase_cnt);
1707
1708 tty->print_cr(" _monitorenter_slowcase_cnt: %u", _monitorenter_slowcase_cnt);
1709 tty->print_cr(" _monitorexit_slowcase_cnt: %u", _monitorexit_slowcase_cnt);
1710 tty->print_cr(" _patch_code_slowcase_cnt: %u", _patch_code_slowcase_cnt);
1711
1712 tty->print_cr(" _throw_range_check_exception_count: %u:", _throw_range_check_exception_count);
1713 tty->print_cr(" _throw_index_exception_count: %u:", _throw_index_exception_count);
1714 tty->print_cr(" _throw_div0_exception_count: %u:", _throw_div0_exception_count);
1715 tty->print_cr(" _throw_null_pointer_exception_count: %u:", _throw_null_pointer_exception_count);
1716 tty->print_cr(" _throw_class_cast_exception_count: %u:", _throw_class_cast_exception_count);
1717 tty->print_cr(" _throw_incompatible_class_change_error_count: %u:", _throw_incompatible_class_change_error_count);
1718 tty->print_cr(" _throw_illegal_monitor_state_exception_count: %u:", _throw_illegal_monitor_state_exception_count);
1719 tty->print_cr(" _throw_identity_exception_count: %u:", _throw_identity_exception_count);
1720 tty->print_cr(" _throw_count: %u:", _throw_count);
1721
1722 SharedRuntime::print_ic_miss_histogram();
1723 tty->cr();
1724 }
1725 #endif // PRODUCT
|