mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
8037112: gc/g1/TestHumongousAllocInitialMark.java caused SIGSEGV
Reviewed-by: brutisso, mgerdin
This commit is contained in:
parent
d78446aa45
commit
a3425b64f0
11 changed files with 89 additions and 10 deletions
|
@ -35,6 +35,7 @@ const size_t G1StringDedupQueue::_max_cache_size = 0; // Max cache size p
|
|||
|
||||
G1StringDedupQueue::G1StringDedupQueue() :
|
||||
_cursor(0),
|
||||
_cancel(false),
|
||||
_empty(true),
|
||||
_dropped(0) {
|
||||
_nqueues = MAX2(ParallelGCThreads, (size_t)1);
|
||||
|
@ -55,11 +56,17 @@ void G1StringDedupQueue::create() {
|
|||
|
||||
void G1StringDedupQueue::wait() {
|
||||
MonitorLockerEx ml(StringDedupQueue_lock, Mutex::_no_safepoint_check_flag);
|
||||
while (_queue->_empty) {
|
||||
while (_queue->_empty && !_queue->_cancel) {
|
||||
ml.wait(Mutex::_no_safepoint_check_flag);
|
||||
}
|
||||
}
|
||||
|
||||
void G1StringDedupQueue::cancel_wait() {
|
||||
MonitorLockerEx ml(StringDedupQueue_lock, Mutex::_no_safepoint_check_flag);
|
||||
_queue->_cancel = true;
|
||||
ml.notify();
|
||||
}
|
||||
|
||||
void G1StringDedupQueue::push(uint worker_id, oop java_string) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "Must be at safepoint");
|
||||
assert(worker_id < _queue->_nqueues, "Invalid queue");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue