equal
deleted
inserted
replaced
75 |
75 |
76 inline void ObjectMonitor::set_object(void* obj) { |
76 inline void ObjectMonitor::set_object(void* obj) { |
77 _object = obj; |
77 _object = obj; |
78 } |
78 } |
79 |
79 |
80 inline bool ObjectMonitor::check(TRAPS) { |
|
81 if (THREAD != _owner) { |
|
82 if (THREAD->is_lock_owned((address) _owner)) { |
|
83 _owner = THREAD; // regain ownership of inflated monitor |
|
84 assert (_recursions == 0, "invariant") ; |
|
85 } else { |
|
86 check_slow(THREAD); |
|
87 return false; |
|
88 } |
|
89 } |
|
90 return true; |
|
91 } |
|
92 |
|
93 // return number of threads contending for this monitor |
80 // return number of threads contending for this monitor |
94 inline jint ObjectMonitor::contentions() const { |
81 inline jint ObjectMonitor::contentions() const { |
95 return _contentions; |
82 return _contentions; |
96 } |
83 } |
97 |
84 |