Lines Matching defs:monitor

66 // The "core" versions of monitor enter and exit reside in this file.
96 #define DTRACE_MONITOR_WAIT_PROBE(monitor, klassOop, thread, millis) \
101 (monitor), bytes, len, (millis)); \
105 #define DTRACE_MONITOR_PROBE(probe, monitor, klassOop, thread) \
110 (uintptr_t)(monitor), bytes, len); \
116 #define DTRACE_MONITOR_WAIT_PROBE(monitor, klassOop, thread, millis) \
121 (uintptr_t)(monitor), bytes, len, (millis)); \
127 #define DTRACE_MONITOR_PROBE(probe, monitor, klassOop, thread) \
132 (uintptr_t)(monitor), bytes, len); \
145 int dtrace_waited_probe(ObjectMonitor* monitor, Handle obj, Thread* thr) {
146 DTRACE_MONITOR_PROBE(waited, monitor, obj(), thr);
157 static volatile intptr_t ListLock = 0 ; // protects global monitor free-list cache
164 // This the fast monitor enter. The interpreter and compiler use
200 ObjectMonitor * m = mark->monitor() ;
250 if (mark->has_monitor() && mark->monitor()->is_entered(THREAD)) {
267 // weight monitor should be ok, unless someone find otherwise.
283 // NOTE: must use heavy weight monitor to handle complete_exit/reenter()
291 ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj());
293 return monitor->complete_exit(THREAD);
296 // NOTE: must use heavy weight monitor to handle complete_exit/reenter()
304 ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj());
306 monitor->reenter(recursion, THREAD);
310 // NOTE: must use heavy weight monitor to handle jni monitor enter
323 // NOTE: must use heavy weight monitor to handle jni monitor enter
330 ObjectMonitor* monitor = ObjectSynchronizer::inflate_helper(obj());
331 return monitor->try_enter(THREAD);
335 // NOTE: must use heavy weight monitor to handle jni monitor exit
345 ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj);
346 // If this thread has locked the object, exit the monitor. Note: can't use
347 // monitor->check(CHECK); must exit even if an exception is pending.
348 if (monitor->check(THREAD)) {
349 monitor->exit(true, THREAD);
378 // NOTE: must use heavy weight monitor to handle wait()
388 ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj());
389 DTRACE_MONITOR_WAIT_PROBE(monitor, obj(), THREAD, millis);
390 monitor->wait(millis, true, THREAD);
394 // DTRACE_MONITOR_PROBE(waited, monitor, obj(), THREAD);
395 dtrace_waited_probe(monitor, obj, THREAD);
637 ObjectMonitor* monitor = NULL;
658 // into heavy weight monitor. We could add more code here
661 monitor = mark->monitor();
662 temp = monitor->header();
670 temp = mark->displaced_mark_helper(); // this is a lightweight monitor owned
679 // to inflate the header into heavyweight monitor
687 // Inflate the monitor to set hash code
688 monitor = ObjectSynchronizer::inflate(Self, obj);
690 mark = monitor->header();
697 test = (markOop) Atomic::cmpxchg_ptr(temp, monitor, mark);
699 // The only update to the header in the monitor (outside GC)
704 assert (hash != 0, "Trivial unexpected object/monitor header usage.");
736 ObjectMonitor* monitor = mark->monitor();
737 return monitor->is_entered(thread) != 0 ;
779 void * owner = mark->monitor()->_owner ;
813 ObjectMonitor* monitor = mark->monitor();
814 assert(monitor != NULL, "monitor should be non-null");
815 owner = (address) monitor->owner();
891 // Constraining monitor pool growth via MonitorBound ...
893 // The monitor pool is grow-only. We scavenge at STW safepoint-time, but the
1029 // initialize the linked list, each monitor points to its next
1030 // forming the single linked free list, the very first monitor
1040 // terminate the last monitor as the end of list
1073 // omRelease is to return a monitor to the free list after a CAS
1183 assert(ObjectSynchronizer::verify_objmon_isinpool(mark->monitor()), "monitor is invalid");
1184 assert(mark->monitor()->header()->is_neutral(), "monitor must record a good object header");
1185 return mark->monitor();
1214 ObjectMonitor * inf = mark->monitor() ;
1217 assert (ObjectSynchronizer::verify_objmon_isinpool(inf), "monitor is invalid");
1302 // Setup monitor fields to proper values -- prepare the monitor
1314 // Must preserve store ordering. The monitor state must
1315 // be stable at the time of publishing the monitor address.
1346 // prepare m for installation - set monitor to initial state
1392 // The scavenged monitor are returned to the monitor free list.
1423 // Deflate a single monitor if not in use
1428 // Normal case ... The monitor is associated with obj.
1430 guarantee (mid == obj->mark()->monitor(), "invariant");
1437 // Deflate the monitor if it is no longer being used
1546 // The monitor is not associated with an object.
1547 // The monitor should either be a thread-specific private
1598 // Iterate through monitor cache and attempt to release thread's monitors
1599 // Gives up on a particular monitor if an exception occurs, but continues
1617 // Scanning the extant monitor list can be time consuming.
1649 // Verify all monitors in the monitor cache, the verification is weak.
1666 // Check if monitor belongs to the monitor cache
1670 int ObjectSynchronizer::verify_objmon_isinpool(ObjectMonitor *monitor) {
1675 if (monitor > &block[0] && monitor < &block[_BLOCKSIZE]) {
1676 address mon = (address) monitor;