< prev index next >
src/hotspot/share/runtime/synchronizer.cpp
Print this page
rev 52355 : Remove safepoint-cleanup piggybacking code
*** 1655,1666 ****
// See also ParallelSPCleanupTask and
// SafepointSynchronize::do_cleanup_tasks() in safepoint.cpp and
// Threads::parallel_java_threads_do() in thread.cpp.
int ObjectSynchronizer::deflate_monitor_list(ObjectMonitor** listHeadp,
ObjectMonitor** freeHeadp,
! ObjectMonitor** freeTailp,
! OopClosure* cl) {
ObjectMonitor* mid;
ObjectMonitor* next;
ObjectMonitor* cur_mid_in_use = NULL;
int deflated_count = 0;
--- 1655,1665 ----
// See also ParallelSPCleanupTask and
// SafepointSynchronize::do_cleanup_tasks() in safepoint.cpp and
// Threads::parallel_java_threads_do() in thread.cpp.
int ObjectSynchronizer::deflate_monitor_list(ObjectMonitor** listHeadp,
ObjectMonitor** freeHeadp,
! ObjectMonitor** freeTailp) {
ObjectMonitor* mid;
ObjectMonitor* next;
ObjectMonitor* cur_mid_in_use = NULL;
int deflated_count = 0;
*** 1677,1689 ****
next = mid->FreeNext;
mid->FreeNext = NULL; // This mid is current tail in the freeHeadp list
mid = next;
deflated_count++;
} else {
- if (obj != NULL && cl != NULL) {
- cl->do_oop((oop*) mid->object_addr());
- }
cur_mid_in_use = mid;
mid = mid->FreeNext;
}
}
return deflated_count;
--- 1676,1685 ----
*** 1784,1801 ****
// Audit/inventory the objectMonitors -- make sure they're all accounted for.
GVars.stwRandom = os::random();
GVars.stwCycle++;
}
! void ObjectSynchronizer::deflate_thread_local_monitors(Thread* thread, DeflateMonitorCounters* counters, OopClosure* cl) {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
if (!MonitorInUseLists) return;
ObjectMonitor * freeHeadp = NULL; // Local SLL of scavenged monitors
ObjectMonitor * freeTailp = NULL;
! int deflated_count = deflate_monitor_list(thread->omInUseList_addr(), &freeHeadp, &freeTailp, cl);
Thread::muxAcquire(&gListLock, "scavenge - return");
// Adjust counters
counters->nInCirculation += thread->omInUseCount;
--- 1780,1797 ----
// Audit/inventory the objectMonitors -- make sure they're all accounted for.
GVars.stwRandom = os::random();
GVars.stwCycle++;
}
! void ObjectSynchronizer::deflate_thread_local_monitors(Thread* thread, DeflateMonitorCounters* counters) {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
if (!MonitorInUseLists) return;
ObjectMonitor * freeHeadp = NULL; // Local SLL of scavenged monitors
ObjectMonitor * freeTailp = NULL;
! int deflated_count = deflate_monitor_list(thread->omInUseList_addr(), &freeHeadp, &freeTailp);
Thread::muxAcquire(&gListLock, "scavenge - return");
// Adjust counters
counters->nInCirculation += thread->omInUseCount;
< prev index next >