< prev index next >

src/hotspot/share/runtime/objectMonitor.hpp

Print this page

197   // objects which can happen at normal VM shutdown.
198   //
199   #define OM_PERFDATA_OP(f, op_str)                 \
200     do {                                            \
201       if (ObjectMonitor::_sync_ ## f != nullptr &&  \
202           PerfDataManager::has_PerfData()) {        \
203         ObjectMonitor::_sync_ ## f->op_str;         \
204       }                                             \
205     } while (0)
206 
207   static PerfCounter * _sync_ContendedLockAttempts;
208   static PerfCounter * _sync_FutileWakeups;
209   static PerfCounter * _sync_Parks;
210   static PerfCounter * _sync_Notifications;
211   static PerfCounter * _sync_Inflations;
212   static PerfCounter * _sync_Deflations;
213   static PerfLongVariable * _sync_MonExtant;
214 
215   static int Knob_SpinLimit;
216 

217   static ByteSize owner_offset()       { return byte_offset_of(ObjectMonitor, _owner); }
218   static ByteSize recursions_offset()  { return byte_offset_of(ObjectMonitor, _recursions); }
219   static ByteSize cxq_offset()         { return byte_offset_of(ObjectMonitor, _cxq); }
220   static ByteSize succ_offset()        { return byte_offset_of(ObjectMonitor, _succ); }
221   static ByteSize EntryList_offset()   { return byte_offset_of(ObjectMonitor, _EntryList); }
222 
223   // ObjectMonitor references can be ORed with markWord::monitor_value
224   // as part of the ObjectMonitor tagging mechanism. When we combine an
225   // ObjectMonitor reference with an offset, we need to remove the tag
226   // value in order to generate the proper address.
227   //
228   // We can either adjust the ObjectMonitor reference and then add the
229   // offset or we can adjust the offset that is added to the ObjectMonitor
230   // reference. The latter avoids an AGI (Address Generation Interlock)
231   // stall so the helper macro adjusts the offset value that is returned
232   // to the ObjectMonitor reference manipulation code:
233   //
234   #define OM_OFFSET_NO_MONITOR_VALUE_TAG(f) \
235     ((in_bytes(ObjectMonitor::f ## _offset())) - checked_cast<int>(markWord::monitor_value))
236 

197   // objects which can happen at normal VM shutdown.
198   //
199   #define OM_PERFDATA_OP(f, op_str)                 \
200     do {                                            \
201       if (ObjectMonitor::_sync_ ## f != nullptr &&  \
202           PerfDataManager::has_PerfData()) {        \
203         ObjectMonitor::_sync_ ## f->op_str;         \
204       }                                             \
205     } while (0)
206 
207   static PerfCounter * _sync_ContendedLockAttempts;
208   static PerfCounter * _sync_FutileWakeups;
209   static PerfCounter * _sync_Parks;
210   static PerfCounter * _sync_Notifications;
211   static PerfCounter * _sync_Inflations;
212   static PerfCounter * _sync_Deflations;
213   static PerfLongVariable * _sync_MonExtant;
214 
215   static int Knob_SpinLimit;
216 
217   static ByteSize header_offset()      { return byte_offset_of(ObjectMonitor, _header); }
218   static ByteSize owner_offset()       { return byte_offset_of(ObjectMonitor, _owner); }
219   static ByteSize recursions_offset()  { return byte_offset_of(ObjectMonitor, _recursions); }
220   static ByteSize cxq_offset()         { return byte_offset_of(ObjectMonitor, _cxq); }
221   static ByteSize succ_offset()        { return byte_offset_of(ObjectMonitor, _succ); }
222   static ByteSize EntryList_offset()   { return byte_offset_of(ObjectMonitor, _EntryList); }
223 
224   // ObjectMonitor references can be ORed with markWord::monitor_value
225   // as part of the ObjectMonitor tagging mechanism. When we combine an
226   // ObjectMonitor reference with an offset, we need to remove the tag
227   // value in order to generate the proper address.
228   //
229   // We can either adjust the ObjectMonitor reference and then add the
230   // offset or we can adjust the offset that is added to the ObjectMonitor
231   // reference. The latter avoids an AGI (Address Generation Interlock)
232   // stall so the helper macro adjusts the offset value that is returned
233   // to the ObjectMonitor reference manipulation code:
234   //
235   #define OM_OFFSET_NO_MONITOR_VALUE_TAG(f) \
236     ((in_bytes(ObjectMonitor::f ## _offset())) - checked_cast<int>(markWord::monitor_value))
237 
< prev index next >