401
402 JFR_ONLY(DEFINE_THREAD_LOCAL_FIELD_JFR;) // Thread-local data for jfr
403
404 int _vm_operation_started_count; // VM_Operation support
405 int _vm_operation_completed_count; // VM_Operation support
406
407 ObjectMonitor* _current_pending_monitor; // ObjectMonitor this thread
408 // is waiting to lock
409 bool _current_pending_monitor_is_from_java; // locking is from Java code
410
411 // ObjectMonitor on which this thread called Object.wait()
412 ObjectMonitor* _current_waiting_monitor;
413
414 // Private thread-local objectmonitor list - a simple cache organized as a SLL.
415 public:
416 ObjectMonitor* omFreeList;
417 int omFreeCount; // length of omFreeList
418 int omFreeProvision; // reload chunk size
419 ObjectMonitor* omInUseList; // SLL to track monitors in circulation
420 int omInUseCount; // length of omInUseList
421
422 #ifdef ASSERT
423 private:
424 volatile uint64_t _visited_for_critical_count;
425
426 public:
427 void set_visited_for_critical_count(uint64_t safepoint_id) {
428 assert(_visited_for_critical_count == 0, "Must be reset before set");
429 assert((safepoint_id & 0x1) == 1, "Must be odd");
430 _visited_for_critical_count = safepoint_id;
431 }
432 void reset_visited_for_critical_count(uint64_t safepoint_id) {
433 assert(_visited_for_critical_count == safepoint_id, "Was not visited");
434 _visited_for_critical_count = 0;
435 }
436 bool was_visited_for_critical_count(uint64_t safepoint_id) const {
437 return _visited_for_critical_count == safepoint_id;
438 }
439 #endif
440
|
401
402 JFR_ONLY(DEFINE_THREAD_LOCAL_FIELD_JFR;) // Thread-local data for jfr
403
404 int _vm_operation_started_count; // VM_Operation support
405 int _vm_operation_completed_count; // VM_Operation support
406
407 ObjectMonitor* _current_pending_monitor; // ObjectMonitor this thread
408 // is waiting to lock
409 bool _current_pending_monitor_is_from_java; // locking is from Java code
410
411 // ObjectMonitor on which this thread called Object.wait()
412 ObjectMonitor* _current_waiting_monitor;
413
414 // Private thread-local objectmonitor list - a simple cache organized as a SLL.
415 public:
416 ObjectMonitor* omFreeList;
417 int omFreeCount; // length of omFreeList
418 int omFreeProvision; // reload chunk size
419 ObjectMonitor* omInUseList; // SLL to track monitors in circulation
420 int omInUseCount; // length of omInUseList
421 volatile bool omShouldDeflateIdleMonitors; // should deflate idle monitors
422
423 #ifdef ASSERT
424 private:
425 volatile uint64_t _visited_for_critical_count;
426
427 public:
428 void set_visited_for_critical_count(uint64_t safepoint_id) {
429 assert(_visited_for_critical_count == 0, "Must be reset before set");
430 assert((safepoint_id & 0x1) == 1, "Must be odd");
431 _visited_for_critical_count = safepoint_id;
432 }
433 void reset_visited_for_critical_count(uint64_t safepoint_id) {
434 assert(_visited_for_critical_count == safepoint_id, "Was not visited");
435 _visited_for_critical_count = 0;
436 }
437 bool was_visited_for_critical_count(uint64_t safepoint_id) const {
438 return _visited_for_critical_count == safepoint_id;
439 }
440 #endif
441
|