hotspot/src/share/vm/gc/g1/ptrQueue.cpp
changeset 46630 75aa3e39d02c
parent 46443 cdb638b5ec53
child 46685 b218dfc2853a
equal deleted inserted replaced
46629:8eeacdc76bf2 46630:75aa3e39d02c
   236 }
   236 }
   237 
   237 
   238 bool PtrQueueSet::process_or_enqueue_complete_buffer(BufferNode* node) {
   238 bool PtrQueueSet::process_or_enqueue_complete_buffer(BufferNode* node) {
   239   if (Thread::current()->is_Java_thread()) {
   239   if (Thread::current()->is_Java_thread()) {
   240     // We don't lock. It is fine to be epsilon-precise here.
   240     // We don't lock. It is fine to be epsilon-precise here.
   241     if (_max_completed_queue == 0 || _max_completed_queue > 0 &&
   241     if (_max_completed_queue == 0 ||
   242         _n_completed_buffers >= _max_completed_queue + _completed_queue_padding) {
   242         (_max_completed_queue > 0 &&
       
   243           _n_completed_buffers >= _max_completed_queue + _completed_queue_padding)) {
   243       bool b = mut_process_buffer(node);
   244       bool b = mut_process_buffer(node);
   244       if (b) {
   245       if (b) {
   245         // True here means that the buffer hasn't been deallocated and the caller may reuse it.
   246         // True here means that the buffer hasn't been deallocated and the caller may reuse it.
   246         return true;
   247         return true;
   247       }
   248       }