Merge
This commit is contained in:
commit
1153ecb06f
@ -154,7 +154,10 @@ void ConcurrentG1RefineThread::run_service() {
|
|||||||
if (_next != NULL && !_next->is_active() && curr_buffer_num > _next->_threshold) {
|
if (_next != NULL && !_next->is_active() && curr_buffer_num > _next->_threshold) {
|
||||||
_next->activate();
|
_next->activate();
|
||||||
}
|
}
|
||||||
} while (dcqs.apply_closure_to_completed_buffer(_refine_closure, _worker_id + _worker_id_offset, cg1r()->green_zone()));
|
} while (dcqs.apply_closure_to_completed_buffer(_refine_closure,
|
||||||
|
_worker_id + _worker_id_offset,
|
||||||
|
cg1r()->green_zone(),
|
||||||
|
false /* during_pause */));
|
||||||
|
|
||||||
// We can exit the loop above while being active if there was a yield request.
|
// We can exit the loop above while being active if there was a yield request.
|
||||||
if (is_active()) {
|
if (is_active()) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -228,37 +228,30 @@ BufferNode* DirtyCardQueueSet::get_completed_buffer(int stop_at) {
|
|||||||
return nd;
|
return nd;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DirtyCardQueueSet::apply_closure_to_completed_buffer_helper(CardTableEntryClosure* cl,
|
|
||||||
uint worker_i,
|
|
||||||
BufferNode* nd) {
|
|
||||||
if (nd != NULL) {
|
|
||||||
void **buf = BufferNode::make_buffer_from_node(nd);
|
|
||||||
size_t index = nd->index();
|
|
||||||
bool b =
|
|
||||||
DirtyCardQueue::apply_closure_to_buffer(cl, buf,
|
|
||||||
index, _sz,
|
|
||||||
true, worker_i);
|
|
||||||
if (b) {
|
|
||||||
deallocate_buffer(buf);
|
|
||||||
return true; // In normal case, go on to next buffer.
|
|
||||||
} else {
|
|
||||||
enqueue_complete_buffer(buf, index);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DirtyCardQueueSet::apply_closure_to_completed_buffer(CardTableEntryClosure* cl,
|
bool DirtyCardQueueSet::apply_closure_to_completed_buffer(CardTableEntryClosure* cl,
|
||||||
uint worker_i,
|
uint worker_i,
|
||||||
int stop_at,
|
int stop_at,
|
||||||
bool during_pause) {
|
bool during_pause) {
|
||||||
assert(!during_pause || stop_at == 0, "Should not leave any completed buffers during a pause");
|
assert(!during_pause || stop_at == 0, "Should not leave any completed buffers during a pause");
|
||||||
BufferNode* nd = get_completed_buffer(stop_at);
|
BufferNode* nd = get_completed_buffer(stop_at);
|
||||||
bool res = apply_closure_to_completed_buffer_helper(cl, worker_i, nd);
|
if (nd == NULL) {
|
||||||
if (res) Atomic::inc(&_processed_buffers_rs_thread);
|
return false;
|
||||||
return res;
|
} else {
|
||||||
|
void** buf = BufferNode::make_buffer_from_node(nd);
|
||||||
|
size_t index = nd->index();
|
||||||
|
if (DirtyCardQueue::apply_closure_to_buffer(cl,
|
||||||
|
buf, index, _sz,
|
||||||
|
true, worker_i)) {
|
||||||
|
// Done with fully processed buffer.
|
||||||
|
deallocate_buffer(buf);
|
||||||
|
Atomic::inc(&_processed_buffers_rs_thread);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// Return partially processed buffer to the queue.
|
||||||
|
enqueue_complete_buffer(buf, index);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirtyCardQueueSet::apply_closure_to_all_completed_buffers(CardTableEntryClosure* cl) {
|
void DirtyCardQueueSet::apply_closure_to_all_completed_buffers(CardTableEntryClosure* cl) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -133,14 +133,9 @@ public:
|
|||||||
// partially completed buffer (with its processed elements set to NULL)
|
// partially completed buffer (with its processed elements set to NULL)
|
||||||
// is returned to the completed buffer set, and this call returns false.
|
// is returned to the completed buffer set, and this call returns false.
|
||||||
bool apply_closure_to_completed_buffer(CardTableEntryClosure* cl,
|
bool apply_closure_to_completed_buffer(CardTableEntryClosure* cl,
|
||||||
uint worker_i = 0,
|
uint worker_i,
|
||||||
int stop_at = 0,
|
int stop_at,
|
||||||
bool during_pause = false);
|
bool during_pause);
|
||||||
|
|
||||||
// Helper routine for the above.
|
|
||||||
bool apply_closure_to_completed_buffer_helper(CardTableEntryClosure* cl,
|
|
||||||
uint worker_i,
|
|
||||||
BufferNode* nd);
|
|
||||||
|
|
||||||
BufferNode* get_completed_buffer(int stop_at);
|
BufferNode* get_completed_buffer(int stop_at);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user