Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1StringDedupThread.cpp @ 17947:1772223a25a2
8037112: gc/g1/TestHumongousAllocInitialMark.java caused SIGSEGV
Reviewed-by: brutisso, mgerdin
author | pliden |
---|---|
date | Fri, 11 Apr 2014 11:00:12 +0200 |
parents | 595c0f60d50d |
children | 581e70386ec9 |
comparison
equal
deleted
inserted
replaced
17946:997fd9660dd5 | 17947:1772223a25a2 |
---|---|
71 | 71 |
72 stat.mark_idle(); | 72 stat.mark_idle(); |
73 | 73 |
74 // Wait for the queue to become non-empty | 74 // Wait for the queue to become non-empty |
75 G1StringDedupQueue::wait(); | 75 G1StringDedupQueue::wait(); |
76 if (_should_terminate) { | |
77 break; | |
78 } | |
76 | 79 |
77 // Include this thread in safepoints | 80 // Include this thread in safepoints |
78 stsJoin(); | 81 stsJoin(); |
79 | 82 |
80 stat.mark_exec(); | 83 stat.mark_exec(); |
106 | 109 |
107 // Exclude this thread from safepoints | 110 // Exclude this thread from safepoints |
108 stsLeave(); | 111 stsLeave(); |
109 } | 112 } |
110 | 113 |
111 ShouldNotReachHere(); | 114 terminate(); |
115 } | |
116 | |
117 void G1StringDedupThread::stop() { | |
118 { | |
119 MonitorLockerEx ml(Terminator_lock); | |
120 _thread->_should_terminate = true; | |
121 } | |
122 | |
123 G1StringDedupQueue::cancel_wait(); | |
124 | |
125 { | |
126 MonitorLockerEx ml(Terminator_lock); | |
127 while (!_thread->_has_terminated) { | |
128 ml.wait(); | |
129 } | |
130 } | |
112 } | 131 } |
113 | 132 |
114 void G1StringDedupThread::print(outputStream* st, const G1StringDedupStat& last_stat, const G1StringDedupStat& total_stat) { | 133 void G1StringDedupThread::print(outputStream* st, const G1StringDedupStat& last_stat, const G1StringDedupStat& total_stat) { |
115 if (G1Log::fine() || PrintStringDeduplicationStatistics) { | 134 if (G1Log::fine() || PrintStringDeduplicationStatistics) { |
116 G1StringDedupStat::print_summary(st, last_stat, total_stat); | 135 G1StringDedupStat::print_summary(st, last_stat, total_stat); |