8037112: gc/g1/TestHumongousAllocInitialMark.java caused SIGSEGV

Reviewed-by: brutisso, mgerdin
This commit is contained in:
Per Lidén 2014-04-11 11:00:12 +02:00
parent d78446aa45
commit a3425b64f0
11 changed files with 89 additions and 10 deletions

View file

@ -73,6 +73,9 @@ void G1StringDedupThread::run() {
// Wait for the queue to become non-empty
G1StringDedupQueue::wait();
if (_should_terminate) {
break;
}
// Include this thread in safepoints
stsJoin();
@ -108,7 +111,23 @@ void G1StringDedupThread::run() {
stsLeave();
}
ShouldNotReachHere();
terminate();
}
void G1StringDedupThread::stop() {
{
MonitorLockerEx ml(Terminator_lock);
_thread->_should_terminate = true;
}
G1StringDedupQueue::cancel_wait();
{
MonitorLockerEx ml(Terminator_lock);
while (!_thread->_has_terminated) {
ml.wait();
}
}
}
void G1StringDedupThread::print(outputStream* st, const G1StringDedupStat& last_stat, const G1StringDedupStat& total_stat) {