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