--- old/src/share/vm/gc/shared/concurrentGCThread.cpp 2016-03-01 17:46:32.779485250 -0500 +++ new/src/share/vm/gc/shared/concurrentGCThread.cpp 2016-03-01 17:46:32.598487513 -0500 @@ -37,12 +37,12 @@ _should_terminate(false), _has_terminated(false) { }; -void ConcurrentGCThread::create_and_start() { +void ConcurrentGCThread::create_and_start(ThreadPriority prio) { if (os::create_thread(this, os::cgc_thread)) { // XXX: need to set this to low priority // unless "aggressive mode" set; priority // should be just less than that of VMThread. - os::set_priority(this, NearMaxPriority); + os::set_priority(this, prio); if (!_should_terminate && !DisableStartThread) { os::start_thread(this); } @@ -88,6 +88,8 @@ // it is ok to take late safepoints here, if needed { MutexLockerEx mu(Terminator_lock); + assert(!_has_terminated, "stop should only be called once"); + assert(!_should_terminate, "stop should only be called once"); _should_terminate = true; }