src/share/vm/c1/c1_Runtime1.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8033145 Sdiff src/share/vm/c1

src/share/vm/c1/c1_Runtime1.cpp

Print this page




 110 int Runtime1::_new_type_array_slowcase_cnt = 0;
 111 int Runtime1::_new_object_array_slowcase_cnt = 0;
 112 int Runtime1::_new_instance_slowcase_cnt = 0;
 113 int Runtime1::_new_multi_array_slowcase_cnt = 0;
 114 int Runtime1::_monitorenter_slowcase_cnt = 0;
 115 int Runtime1::_monitorexit_slowcase_cnt = 0;
 116 int Runtime1::_patch_code_slowcase_cnt = 0;
 117 int Runtime1::_throw_range_check_exception_count = 0;
 118 int Runtime1::_throw_index_exception_count = 0;
 119 int Runtime1::_throw_div0_exception_count = 0;
 120 int Runtime1::_throw_null_pointer_exception_count = 0;
 121 int Runtime1::_throw_class_cast_exception_count = 0;
 122 int Runtime1::_throw_incompatible_class_change_error_count = 0;
 123 int Runtime1::_throw_array_store_exception_count = 0;
 124 int Runtime1::_throw_count = 0;
 125 
 126 static int _byte_arraycopy_cnt = 0;
 127 static int _short_arraycopy_cnt = 0;
 128 static int _int_arraycopy_cnt = 0;
 129 static int _long_arraycopy_cnt = 0;
 130 static int _oop_arraycopy_cnt = 0;
 131 
 132 address Runtime1::arraycopy_count_address(BasicType type) {
 133   switch (type) {
 134   case T_BOOLEAN:
 135   case T_BYTE:   return (address)&_byte_arraycopy_cnt;
 136   case T_CHAR:
 137   case T_SHORT:  return (address)&_short_arraycopy_cnt;
 138   case T_FLOAT:
 139   case T_INT:    return (address)&_int_arraycopy_cnt;
 140   case T_DOUBLE:
 141   case T_LONG:   return (address)&_long_arraycopy_cnt;
 142   case T_ARRAY:
 143   case T_OBJECT: return (address)&_oop_arraycopy_cnt;
 144   default:
 145     ShouldNotReachHere();
 146     return NULL;
 147   }
 148 }
 149 
 150 
 151 #endif
 152 
 153 // Simple helper to see if the caller of a runtime stub which
 154 // entered the VM has been deoptimized
 155 
 156 static bool caller_is_deopted() {
 157   JavaThread* thread = JavaThread::current();
 158   RegisterMap reg_map(thread, false);
 159   frame runtime_frame = thread->last_frame();
 160   frame caller_frame = runtime_frame.sender(&reg_map);
 161   assert(caller_frame.is_compiled_frame(), "must be compiled");
 162   return caller_frame.is_deoptimized_frame();
 163 }


1468   Deoptimization::deoptimize_frame(thread, caller_frame.id());
1469 
1470 JRT_END
1471 
1472 #ifndef PRODUCT
1473 void Runtime1::print_statistics() {
1474   tty->print_cr("C1 Runtime statistics:");
1475   tty->print_cr(" _resolve_invoke_virtual_cnt:     %d", SharedRuntime::_resolve_virtual_ctr);
1476   tty->print_cr(" _resolve_invoke_opt_virtual_cnt: %d", SharedRuntime::_resolve_opt_virtual_ctr);
1477   tty->print_cr(" _resolve_invoke_static_cnt:      %d", SharedRuntime::_resolve_static_ctr);
1478   tty->print_cr(" _handle_wrong_method_cnt:        %d", SharedRuntime::_wrong_method_ctr);
1479   tty->print_cr(" _ic_miss_cnt:                    %d", SharedRuntime::_ic_miss_ctr);
1480   tty->print_cr(" _generic_arraycopy_cnt:          %d", _generic_arraycopy_cnt);
1481   tty->print_cr(" _generic_arraycopystub_cnt:      %d", _generic_arraycopystub_cnt);
1482   tty->print_cr(" _byte_arraycopy_cnt:             %d", _byte_arraycopy_cnt);
1483   tty->print_cr(" _short_arraycopy_cnt:            %d", _short_arraycopy_cnt);
1484   tty->print_cr(" _int_arraycopy_cnt:              %d", _int_arraycopy_cnt);
1485   tty->print_cr(" _long_arraycopy_cnt:             %d", _long_arraycopy_cnt);
1486   tty->print_cr(" _primitive_arraycopy_cnt:        %d", _primitive_arraycopy_cnt);
1487   tty->print_cr(" _oop_arraycopy_cnt (C):          %d", Runtime1::_oop_arraycopy_cnt);
1488   tty->print_cr(" _oop_arraycopy_cnt (stub):       %d", _oop_arraycopy_cnt);
1489   tty->print_cr(" _arraycopy_slowcase_cnt:         %d", _arraycopy_slowcase_cnt);
1490   tty->print_cr(" _arraycopy_checkcast_cnt:        %d", _arraycopy_checkcast_cnt);
1491   tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%d", _arraycopy_checkcast_attempt_cnt);
1492 
1493   tty->print_cr(" _new_type_array_slowcase_cnt:    %d", _new_type_array_slowcase_cnt);
1494   tty->print_cr(" _new_object_array_slowcase_cnt:  %d", _new_object_array_slowcase_cnt);
1495   tty->print_cr(" _new_instance_slowcase_cnt:      %d", _new_instance_slowcase_cnt);
1496   tty->print_cr(" _new_multi_array_slowcase_cnt:   %d", _new_multi_array_slowcase_cnt);
1497   tty->print_cr(" _monitorenter_slowcase_cnt:      %d", _monitorenter_slowcase_cnt);
1498   tty->print_cr(" _monitorexit_slowcase_cnt:       %d", _monitorexit_slowcase_cnt);
1499   tty->print_cr(" _patch_code_slowcase_cnt:        %d", _patch_code_slowcase_cnt);
1500 
1501   tty->print_cr(" _throw_range_check_exception_count:            %d:", _throw_range_check_exception_count);
1502   tty->print_cr(" _throw_index_exception_count:                  %d:", _throw_index_exception_count);
1503   tty->print_cr(" _throw_div0_exception_count:                   %d:", _throw_div0_exception_count);
1504   tty->print_cr(" _throw_null_pointer_exception_count:           %d:", _throw_null_pointer_exception_count);
1505   tty->print_cr(" _throw_class_cast_exception_count:             %d:", _throw_class_cast_exception_count);
1506   tty->print_cr(" _throw_incompatible_class_change_error_count:  %d:", _throw_incompatible_class_change_error_count);
1507   tty->print_cr(" _throw_array_store_exception_count:            %d:", _throw_array_store_exception_count);
1508   tty->print_cr(" _throw_count:                                  %d:", _throw_count);


 110 int Runtime1::_new_type_array_slowcase_cnt = 0;
 111 int Runtime1::_new_object_array_slowcase_cnt = 0;
 112 int Runtime1::_new_instance_slowcase_cnt = 0;
 113 int Runtime1::_new_multi_array_slowcase_cnt = 0;
 114 int Runtime1::_monitorenter_slowcase_cnt = 0;
 115 int Runtime1::_monitorexit_slowcase_cnt = 0;
 116 int Runtime1::_patch_code_slowcase_cnt = 0;
 117 int Runtime1::_throw_range_check_exception_count = 0;
 118 int Runtime1::_throw_index_exception_count = 0;
 119 int Runtime1::_throw_div0_exception_count = 0;
 120 int Runtime1::_throw_null_pointer_exception_count = 0;
 121 int Runtime1::_throw_class_cast_exception_count = 0;
 122 int Runtime1::_throw_incompatible_class_change_error_count = 0;
 123 int Runtime1::_throw_array_store_exception_count = 0;
 124 int Runtime1::_throw_count = 0;
 125 
 126 static int _byte_arraycopy_cnt = 0;
 127 static int _short_arraycopy_cnt = 0;
 128 static int _int_arraycopy_cnt = 0;
 129 static int _long_arraycopy_cnt = 0;
 130 static int _oop_arraycopy_stub_cnt = 0;
 131 
 132 address Runtime1::arraycopy_count_address(BasicType type) {
 133   switch (type) {
 134   case T_BOOLEAN:
 135   case T_BYTE:   return (address)&_byte_arraycopy_cnt;
 136   case T_CHAR:
 137   case T_SHORT:  return (address)&_short_arraycopy_cnt;
 138   case T_FLOAT:
 139   case T_INT:    return (address)&_int_arraycopy_cnt;
 140   case T_DOUBLE:
 141   case T_LONG:   return (address)&_long_arraycopy_cnt;
 142   case T_ARRAY:
 143   case T_OBJECT: return (address)&_oop_arraycopy_stub_cnt;
 144   default:
 145     ShouldNotReachHere();
 146     return NULL;
 147   }
 148 }
 149 
 150 
 151 #endif
 152 
 153 // Simple helper to see if the caller of a runtime stub which
 154 // entered the VM has been deoptimized
 155 
 156 static bool caller_is_deopted() {
 157   JavaThread* thread = JavaThread::current();
 158   RegisterMap reg_map(thread, false);
 159   frame runtime_frame = thread->last_frame();
 160   frame caller_frame = runtime_frame.sender(&reg_map);
 161   assert(caller_frame.is_compiled_frame(), "must be compiled");
 162   return caller_frame.is_deoptimized_frame();
 163 }


1468   Deoptimization::deoptimize_frame(thread, caller_frame.id());
1469 
1470 JRT_END
1471 
1472 #ifndef PRODUCT
1473 void Runtime1::print_statistics() {
1474   tty->print_cr("C1 Runtime statistics:");
1475   tty->print_cr(" _resolve_invoke_virtual_cnt:     %d", SharedRuntime::_resolve_virtual_ctr);
1476   tty->print_cr(" _resolve_invoke_opt_virtual_cnt: %d", SharedRuntime::_resolve_opt_virtual_ctr);
1477   tty->print_cr(" _resolve_invoke_static_cnt:      %d", SharedRuntime::_resolve_static_ctr);
1478   tty->print_cr(" _handle_wrong_method_cnt:        %d", SharedRuntime::_wrong_method_ctr);
1479   tty->print_cr(" _ic_miss_cnt:                    %d", SharedRuntime::_ic_miss_ctr);
1480   tty->print_cr(" _generic_arraycopy_cnt:          %d", _generic_arraycopy_cnt);
1481   tty->print_cr(" _generic_arraycopystub_cnt:      %d", _generic_arraycopystub_cnt);
1482   tty->print_cr(" _byte_arraycopy_cnt:             %d", _byte_arraycopy_cnt);
1483   tty->print_cr(" _short_arraycopy_cnt:            %d", _short_arraycopy_cnt);
1484   tty->print_cr(" _int_arraycopy_cnt:              %d", _int_arraycopy_cnt);
1485   tty->print_cr(" _long_arraycopy_cnt:             %d", _long_arraycopy_cnt);
1486   tty->print_cr(" _primitive_arraycopy_cnt:        %d", _primitive_arraycopy_cnt);
1487   tty->print_cr(" _oop_arraycopy_cnt (C):          %d", Runtime1::_oop_arraycopy_cnt);
1488   tty->print_cr(" _oop_arraycopy_cnt (stub):       %d", _oop_arraycopy_stub_cnt);
1489   tty->print_cr(" _arraycopy_slowcase_cnt:         %d", _arraycopy_slowcase_cnt);
1490   tty->print_cr(" _arraycopy_checkcast_cnt:        %d", _arraycopy_checkcast_cnt);
1491   tty->print_cr(" _arraycopy_checkcast_attempt_cnt:%d", _arraycopy_checkcast_attempt_cnt);
1492 
1493   tty->print_cr(" _new_type_array_slowcase_cnt:    %d", _new_type_array_slowcase_cnt);
1494   tty->print_cr(" _new_object_array_slowcase_cnt:  %d", _new_object_array_slowcase_cnt);
1495   tty->print_cr(" _new_instance_slowcase_cnt:      %d", _new_instance_slowcase_cnt);
1496   tty->print_cr(" _new_multi_array_slowcase_cnt:   %d", _new_multi_array_slowcase_cnt);
1497   tty->print_cr(" _monitorenter_slowcase_cnt:      %d", _monitorenter_slowcase_cnt);
1498   tty->print_cr(" _monitorexit_slowcase_cnt:       %d", _monitorexit_slowcase_cnt);
1499   tty->print_cr(" _patch_code_slowcase_cnt:        %d", _patch_code_slowcase_cnt);
1500 
1501   tty->print_cr(" _throw_range_check_exception_count:            %d:", _throw_range_check_exception_count);
1502   tty->print_cr(" _throw_index_exception_count:                  %d:", _throw_index_exception_count);
1503   tty->print_cr(" _throw_div0_exception_count:                   %d:", _throw_div0_exception_count);
1504   tty->print_cr(" _throw_null_pointer_exception_count:           %d:", _throw_null_pointer_exception_count);
1505   tty->print_cr(" _throw_class_cast_exception_count:             %d:", _throw_class_cast_exception_count);
1506   tty->print_cr(" _throw_incompatible_class_change_error_count:  %d:", _throw_incompatible_class_change_error_count);
1507   tty->print_cr(" _throw_array_store_exception_count:            %d:", _throw_array_store_exception_count);
1508   tty->print_cr(" _throw_count:                                  %d:", _throw_count);
src/share/vm/c1/c1_Runtime1.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File