1117 1118 // Set an initial hint. Don't use set_hint_di() because 1119 // first_di() may be out of bounds if data_size is 0. 1120 // In that situation, _hint_di is never used, but at 1121 // least well-defined. 1122 _hint_di = first_di(); 1123 1124 post_initialize(&stream); 1125 1126 set_size(object_size); 1127 } 1128 1129 void MethodData::init() { 1130 _invocation_counter.init(); 1131 _backedge_counter.init(); 1132 _invocation_counter_start = 0; 1133 _backedge_counter_start = 0; 1134 _tenure_traps = 0; 1135 _num_loops = 0; 1136 _num_blocks = 0; 1137 _highest_comp_level = 0; 1138 _highest_osr_comp_level = 0; 1139 _would_profile = true; 1140 1141 #if INCLUDE_RTM_OPT 1142 _rtm_state = NoRTM; // No RTM lock eliding by default 1143 if (UseRTMLocking && 1144 !CompilerOracle::has_option_string(_method, "NoRTMLockEliding")) { 1145 if (CompilerOracle::has_option_string(_method, "UseRTMLockEliding") || !UseRTMDeopt) { 1146 // Generate RTM lock eliding code without abort ratio calculation code. 1147 _rtm_state = UseRTM; 1148 } else if (UseRTMDeopt) { 1149 // Generate RTM lock eliding code and include abort ratio calculation 1150 // code if UseRTMDeopt is on. 1151 _rtm_state = ProfileRTM; 1152 } 1153 } 1154 #endif 1155 1156 // Initialize flags and trap history. 1157 _nof_decompiles = 0; 1158 _nof_overflow_recompiles = 0; | 1117 1118 // Set an initial hint. Don't use set_hint_di() because 1119 // first_di() may be out of bounds if data_size is 0. 1120 // In that situation, _hint_di is never used, but at 1121 // least well-defined. 1122 _hint_di = first_di(); 1123 1124 post_initialize(&stream); 1125 1126 set_size(object_size); 1127 } 1128 1129 void MethodData::init() { 1130 _invocation_counter.init(); 1131 _backedge_counter.init(); 1132 _invocation_counter_start = 0; 1133 _backedge_counter_start = 0; 1134 _tenure_traps = 0; 1135 _num_loops = 0; 1136 _num_blocks = 0; 1137 _would_profile = true; 1138 1139 #if INCLUDE_RTM_OPT 1140 _rtm_state = NoRTM; // No RTM lock eliding by default 1141 if (UseRTMLocking && 1142 !CompilerOracle::has_option_string(_method, "NoRTMLockEliding")) { 1143 if (CompilerOracle::has_option_string(_method, "UseRTMLockEliding") || !UseRTMDeopt) { 1144 // Generate RTM lock eliding code without abort ratio calculation code. 1145 _rtm_state = UseRTM; 1146 } else if (UseRTMDeopt) { 1147 // Generate RTM lock eliding code and include abort ratio calculation 1148 // code if UseRTMDeopt is on. 1149 _rtm_state = ProfileRTM; 1150 } 1151 } 1152 #endif 1153 1154 // Initialize flags and trap history. 1155 _nof_decompiles = 0; 1156 _nof_overflow_recompiles = 0; |