8133121: Move implementation of process_grey_object to concurrentMark.inline.hpp

Move implementation of process_grey_object to inline.hpp

Reviewed-by: kbarrett, simonis
This commit is contained in:
Axel Siebenborn 2015-08-13 09:32:01 +02:00
parent 4694fbd776
commit d32b06427d
3 changed files with 26 additions and 24 deletions

View File

@ -3088,29 +3088,6 @@ void ConcurrentMark::print_finger() {
}
#endif
template<bool scan>
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<true>(oop);
template void CMTask::process_grey_object<false>(oop);
// Closure for iteration over bitmaps
class CMBitMapClosure : public BitMapClosure {
private:

View File

@ -1126,7 +1126,7 @@ public:
inline void deal_with_reference(oop obj);
// It scans an object and visits its children.
void scan_object(oop obj) { process_grey_object<true>(obj); }
inline void scan_object(oop obj);
// It pushes an object on the local queue.
inline void push(oop obj);

View File

@ -232,6 +232,9 @@ inline void CMMarkStack::iterate(Fn fn) {
}
}
// It scans an object and visits its children.
inline void CMTask::scan_object(oop obj) { process_grey_object<true>(obj); }
inline void CMTask::push(oop obj) {
HeapWord* objAddr = (HeapWord*) obj;
assert(_g1h->is_in_g1_reserved(objAddr), "invariant");
@ -299,6 +302,28 @@ inline bool CMTask::is_below_finger(oop obj, HeapWord* global_finger) const {
return objAddr < global_finger;
}
template<bool scan>
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)) {