< prev index next >
src/share/vm/gc/cms/concurrentMarkSweepThread.cpp
Print this page
*** 26,36 ****
#include "classfile/systemDictionary.hpp"
#include "gc/cms/concurrentMarkSweepGeneration.inline.hpp"
#include "gc/cms/concurrentMarkSweepThread.hpp"
#include "gc/shared/gcId.hpp"
#include "gc/shared/genCollectedHeap.hpp"
! #include "oops/instanceRefKlass.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/init.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
--- 26,36 ----
#include "classfile/systemDictionary.hpp"
#include "gc/cms/concurrentMarkSweepGeneration.inline.hpp"
#include "gc/cms/concurrentMarkSweepThread.hpp"
#include "gc/shared/gcId.hpp"
#include "gc/shared/genCollectedHeap.hpp"
! #include "gc/shared/referencePendingListLocker.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/init.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
*** 44,58 ****
CMSCollector* ConcurrentMarkSweepThread::_collector = NULL;
int ConcurrentMarkSweepThread::_CMS_flag = CMS_nil;
volatile jint ConcurrentMarkSweepThread::_pending_yields = 0;
- SurrogateLockerThread* ConcurrentMarkSweepThread::_slt = NULL;
- SurrogateLockerThread::SLT_msg_type
- ConcurrentMarkSweepThread::_sltBuffer = SurrogateLockerThread::empty;
- Monitor* ConcurrentMarkSweepThread::_sltMonitor = NULL;
-
ConcurrentMarkSweepThread::ConcurrentMarkSweepThread(CMSCollector* collector)
: ConcurrentGCThread() {
assert(UseConcMarkSweepGC, "UseConcMarkSweepGC should be set");
assert(_cmst == NULL, "CMS thread already created");
_cmst = this;
--- 44,53 ----
*** 71,82 ****
// Note that there's a possibility of the VMThread
// starving if UseCriticalCMSThreadPriority is on.
// That won't happen on Solaris for various reasons,
// but may well happen on non-Solaris platforms.
create_and_start(UseCriticalCMSThreadPriority ? CriticalPriority : NearMaxPriority);
-
- _sltMonitor = SLT_lock;
}
void ConcurrentMarkSweepThread::run_service() {
assert(this == cmst(), "just checking");
--- 66,75 ----
*** 92,102 ****
// Wait until the surrogate locker thread that will do
// pending list locking on our behalf has been created.
// We cannot start the SLT thread ourselves since we need
// to be a JavaThread to do so.
CMSLoopCountWarn loopY("CMS::run", "waiting for SLT installation", 2);
! while (_slt == NULL && !should_terminate()) {
CGC_lock->wait(true, 200);
loopY.tick();
}
clear_CMS_flag(CMS_cms_wants_token);
}
--- 85,95 ----
// Wait until the surrogate locker thread that will do
// pending list locking on our behalf has been created.
// We cannot start the SLT thread ourselves since we need
// to be a JavaThread to do so.
CMSLoopCountWarn loopY("CMS::run", "waiting for SLT installation", 2);
! while (!ReferencePendingListLocker::is_initialized() && !should_terminate()) {
CGC_lock->wait(true, 200);
loopY.tick();
}
clear_CMS_flag(CMS_cms_wants_token);
}
*** 335,351 ****
}
// .. collection criterion not yet met, let's go back
// and wait some more
}
}
-
- // Note: this method, although exported by the ConcurrentMarkSweepThread,
- // which is a non-JavaThread, can only be called by a JavaThread.
- // Currently this is done at vm creation time (post-vm-init) by the
- // main/Primordial (Java)Thread.
- // XXX Consider changing this in the future to allow the CMS thread
- // itself to create this thread?
- void ConcurrentMarkSweepThread::makeSurrogateLockerThread(TRAPS) {
- assert(UseConcMarkSweepGC, "SLT thread needed only for CMS GC");
- assert(_slt == NULL, "SLT already created");
- _slt = SurrogateLockerThread::make(THREAD);
- }
--- 328,332 ----
< prev index next >