8230332: G1DirtyCardQueueSet _notify_when_complete is always true

Removed _notify_when_complete, assume true value where formerly used.

Reviewed-by: sjohanss, tschatzl
This commit is contained in:
Kim Barrett 2019-08-29 18:52:30 -04:00
parent 489f8027be
commit 6d064a747e
2 changed files with 6 additions and 13 deletions

View File

@ -80,7 +80,7 @@ void G1DirtyCardQueue::handle_completed_buffer() {
}
}
G1DirtyCardQueueSet::G1DirtyCardQueueSet(bool notify_when_complete) :
G1DirtyCardQueueSet::G1DirtyCardQueueSet() :
PtrQueueSet(),
_cbl_mon(NULL),
_completed_buffers_head(NULL),
@ -88,7 +88,6 @@ G1DirtyCardQueueSet::G1DirtyCardQueueSet(bool notify_when_complete) :
_num_cards(0),
_process_cards_threshold(ProcessCardsThresholdNever),
_process_completed_buffers(false),
_notify_when_complete(notify_when_complete),
_max_cards(MaxCardsUnlimited),
_max_cards_padding(0),
_free_ids(NULL),
@ -124,7 +123,7 @@ void G1DirtyCardQueueSet::handle_zero_index_for_thread(Thread* t) {
}
void G1DirtyCardQueueSet::enqueue_completed_buffer(BufferNode* cbn) {
MutexLocker x(_cbl_mon, Mutex::_no_safepoint_check_flag);
MonitorLocker ml(_cbl_mon, Mutex::_no_safepoint_check_flag);
cbn->set_next(NULL);
if (_completed_buffers_tail == NULL) {
assert(_completed_buffers_head == NULL, "Well-formedness");
@ -139,9 +138,7 @@ void G1DirtyCardQueueSet::enqueue_completed_buffer(BufferNode* cbn) {
if (!process_completed_buffers() &&
(num_cards() > process_cards_threshold())) {
set_process_completed_buffers(true);
if (_notify_when_complete) {
_cbl_mon->notify_all();
}
ml.notify_all();
}
verify_num_cards();
}
@ -203,11 +200,10 @@ void G1DirtyCardQueueSet::abandon_completed_buffers() {
}
void G1DirtyCardQueueSet::notify_if_necessary() {
MutexLocker x(_cbl_mon, Mutex::_no_safepoint_check_flag);
MonitorLocker ml(_cbl_mon, Mutex::_no_safepoint_check_flag);
if (num_cards() > process_cards_threshold()) {
set_process_completed_buffers(true);
if (_notify_when_complete)
_cbl_mon->notify();
ml.notify_all();
}
}

View File

@ -76,9 +76,6 @@ class G1DirtyCardQueueSet: public PtrQueueSet {
size_t _process_cards_threshold;
volatile bool _process_completed_buffers;
// If true, notify_all on _cbl_mon when the threshold is reached.
bool _notify_when_complete;
void abandon_completed_buffers();
// Apply the closure to the elements of "node" from it's index to
@ -126,7 +123,7 @@ class G1DirtyCardQueueSet: public PtrQueueSet {
jint _processed_buffers_rs_thread;
public:
G1DirtyCardQueueSet(bool notify_when_complete = true);
G1DirtyCardQueueSet();
~G1DirtyCardQueueSet();
void initialize(Monitor* cbl_mon,