# HG changeset patch # Parent 1d6b6f256af49fef5b83b7febae61e089b1805dc # User tschatzl diff -r 1d6b6f256af4 src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp --- a/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp Sun Sep 20 02:38:33 2015 +0200 +++ b/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp Sun Sep 20 02:45:17 2015 +0200 @@ -257,4 +257,3 @@ gclog_or_tty->print_cr("G1-Refine-stop"); } } - diff -r 1d6b6f256af4 src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp --- a/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp Sun Sep 20 02:38:33 2015 +0200 +++ b/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp Sun Sep 20 02:45:17 2015 +0200 @@ -77,8 +77,6 @@ } }; - - void ConcurrentMarkThread::run() { initialize_in_thread(); _vtime_start = os::elapsedVTime(); diff -r 1d6b6f256af4 src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp --- a/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp Sun Sep 20 02:38:33 2015 +0200 +++ b/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp Sun Sep 20 02:45:17 2015 +0200 @@ -113,7 +113,7 @@ guarantee(b, "Should not be interrupted."); } -bool DirtyCardQueueSet::mut_process_buffer(void** buf) { +void DirtyCardQueueSet::mut_process_buffer() { // Used to determine if we had already claimed a par_id // before entering this method. @@ -131,7 +131,6 @@ if (worker_i != UINT_MAX) { already_claimed = true; } else { - // Otherwise we need to claim a par id worker_i = _free_ids->claim_par_id(); @@ -139,11 +138,11 @@ thread->set_claimed_par_id(worker_i); } - bool b = false; if (worker_i != UINT_MAX) { - b = DirtyCardQueue::apply_closure_to_buffer(_mut_process_closure, buf, 0, - _sz, true, worker_i); - if (b) Atomic::inc(&_processed_buffers_mut); + bool b = DirtyCardQueueSet::apply_closure_to_completed_buffer(_mut_process_closure, worker_i); + if (b) { + Atomic::inc(&_processed_buffers_mut); + } // If we had not claimed an id before entering the method // then we must release the id. @@ -156,7 +155,6 @@ thread->set_claimed_par_id(UINT_MAX); } } - return b; } diff -r 1d6b6f256af4 src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp --- a/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp Sun Sep 20 02:38:33 2015 +0200 +++ b/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp Sun Sep 20 02:45:17 2015 +0200 @@ -86,7 +86,7 @@ DirtyCardQueue _shared_dirty_card_queue; // Override. - bool mut_process_buffer(void** buf); + void mut_process_buffer(); // Protected by the _cbl_mon. FreeIdSet* _free_ids; diff -r 1d6b6f256af4 src/share/vm/gc_implementation/g1/ptrQueue.cpp --- a/src/share/vm/gc_implementation/g1/ptrQueue.cpp Sun Sep 20 02:38:33 2015 +0200 +++ b/src/share/vm/gc_implementation/g1/ptrQueue.cpp Sun Sep 20 02:45:17 2015 +0200 @@ -197,19 +197,17 @@ } bool PtrQueueSet::process_or_enqueue_complete_buffer(void** buf) { + // The buffer will be enqueued. The caller will have to get a new one. + enqueue_complete_buffer(buf); + if (Thread::current()->is_Java_thread()) { // We don't lock. It is fine to be epsilon-precise here. if (_max_completed_queue == 0 || _max_completed_queue > 0 && _n_completed_buffers >= _max_completed_queue + _completed_queue_padding) { - bool b = mut_process_buffer(buf); - if (b) { - // True here means that the buffer hasn't been deallocated and the caller may reuse it. - return true; - } + mut_process_buffer(); } } - // The buffer will be enqueued. The caller will have to get a new one. - enqueue_complete_buffer(buf); + return false; } diff -r 1d6b6f256af4 src/share/vm/gc_implementation/g1/ptrQueue.hpp --- a/src/share/vm/gc_implementation/g1/ptrQueue.hpp Sun Sep 20 02:38:33 2015 +0200 +++ b/src/share/vm/gc_implementation/g1/ptrQueue.hpp Sun Sep 20 02:45:17 2015 +0200 @@ -239,11 +239,8 @@ protected: // A mutator thread does the the work of processing a buffer. - // Returns "true" iff the work is complete (and the buffer may be - // deallocated). - virtual bool mut_process_buffer(void** buf) { + virtual void mut_process_buffer() { ShouldNotReachHere(); - return false; } public: