# HG changeset patch # User asiebenborn # Date 1439451121 -7200 # Node ID fec57eb3f5998f52be579f684f562b66edc0e8f1 # Parent 8b5eb3750c413cda653f07707b3562b22ee72fb9 8133121: Move implementation of process_grey_object to concurrentMark.inline.hpp Summary: move implementation of process_grey_object to inline.hpp Reviewed-by: kbarrett, simonis diff -r 8b5eb3750c41 -r fec57eb3f599 hotspot/src/share/vm/gc/g1/concurrentMark.cpp --- a/hotspot/src/share/vm/gc/g1/concurrentMark.cpp Wed Aug 12 14:18:12 2015 -0400 +++ b/hotspot/src/share/vm/gc/g1/concurrentMark.cpp Thu Aug 13 09:32:01 2015 +0200 @@ -3088,29 +3088,6 @@ } #endif -template -inline void CMTask::process_grey_object(oop obj) { - assert(scan || obj->is_typeArray(), "Skipping scan of grey non-typeArray"); - assert(_nextMarkBitMap->isMarked((HeapWord*) obj), "invariant"); - - if (_cm->verbose_high()) { - gclog_or_tty->print_cr("[%u] processing grey object " PTR_FORMAT, - _worker_id, p2i((void*) obj)); - } - - size_t obj_size = obj->size(); - _words_scanned += obj_size; - - if (scan) { - obj->oop_iterate(_cm_oop_closure); - } - statsOnly( ++_objs_scanned ); - check_limits(); -} - -template void CMTask::process_grey_object(oop); -template void CMTask::process_grey_object(oop); - // Closure for iteration over bitmaps class CMBitMapClosure : public BitMapClosure { private: diff -r 8b5eb3750c41 -r fec57eb3f599 hotspot/src/share/vm/gc/g1/concurrentMark.hpp --- a/hotspot/src/share/vm/gc/g1/concurrentMark.hpp Wed Aug 12 14:18:12 2015 -0400 +++ b/hotspot/src/share/vm/gc/g1/concurrentMark.hpp Thu Aug 13 09:32:01 2015 +0200 @@ -1126,7 +1126,7 @@ inline void deal_with_reference(oop obj); // It scans an object and visits its children. - void scan_object(oop obj) { process_grey_object(obj); } + inline void scan_object(oop obj); // It pushes an object on the local queue. inline void push(oop obj); diff -r 8b5eb3750c41 -r fec57eb3f599 hotspot/src/share/vm/gc/g1/concurrentMark.inline.hpp --- a/hotspot/src/share/vm/gc/g1/concurrentMark.inline.hpp Wed Aug 12 14:18:12 2015 -0400 +++ b/hotspot/src/share/vm/gc/g1/concurrentMark.inline.hpp Thu Aug 13 09:32:01 2015 +0200 @@ -232,6 +232,9 @@ } } +// It scans an object and visits its children. +inline void CMTask::scan_object(oop obj) { process_grey_object(obj); } + inline void CMTask::push(oop obj) { HeapWord* objAddr = (HeapWord*) obj; assert(_g1h->is_in_g1_reserved(objAddr), "invariant"); @@ -299,6 +302,28 @@ return objAddr < global_finger; } +template +inline void CMTask::process_grey_object(oop obj) { + assert(scan || obj->is_typeArray(), "Skipping scan of grey non-typeArray"); + assert(_nextMarkBitMap->isMarked((HeapWord*) obj), "invariant"); + + if (_cm->verbose_high()) { + gclog_or_tty->print_cr("[%u] processing grey object " PTR_FORMAT, + _worker_id, p2i((void*) obj)); + } + + size_t obj_size = obj->size(); + _words_scanned += obj_size; + + if (scan) { + obj->oop_iterate(_cm_oop_closure); + } + statsOnly( ++_objs_scanned ); + check_limits(); +} + + + inline void CMTask::make_reference_grey(oop obj, HeapRegion* hr) { if (_cm->par_mark_and_count(obj, hr, _marked_bytes_array, _card_bm)) {