src/share/vm/oops/methodData.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/oops

src/share/vm/oops/methodData.cpp

Print this page




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;




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   _stats_valid = false;
1138   _would_profile = true;
1139 
1140 #if INCLUDE_RTM_OPT
1141   _rtm_state = NoRTM; // No RTM lock eliding by default
1142   if (UseRTMLocking &&
1143       !CompilerOracle::has_option_string(_method, "NoRTMLockEliding")) {
1144     if (CompilerOracle::has_option_string(_method, "UseRTMLockEliding") || !UseRTMDeopt) {
1145       // Generate RTM lock eliding code without abort ratio calculation code.
1146       _rtm_state = UseRTM;
1147     } else if (UseRTMDeopt) {
1148       // Generate RTM lock eliding code and include abort ratio calculation
1149       // code if UseRTMDeopt is on.
1150       _rtm_state = ProfileRTM;
1151     }
1152   }
1153 #endif
1154 
1155   // Initialize flags and trap history.
1156   _nof_decompiles = 0;
1157   _nof_overflow_recompiles = 0;


src/share/vm/oops/methodData.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File