# HG changeset patch # User brutisso # Date 1429539482 -7200 # Node ID d241c747e6b3ac894165427691bf12979b26d8e1 # Parent 041d6fdcfa650f9626d3c55ce098abb70a1dd09c 8078156: G1: Remove dead code PrintObjsInRegionClosure Reviewed-by: tschatzl, sjohanss diff -r 041d6fdcfa65 -r d241c747e6b3 hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Apr 20 14:26:54 2015 +0200 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Apr 20 16:18:02 2015 +0200 @@ -2921,35 +2921,6 @@ size_t live_bytes() { return _live_bytes; } }; -class PrintObjsInRegionClosure : public ObjectClosure { - HeapRegion *_hr; - G1CollectedHeap *_g1; -public: - PrintObjsInRegionClosure(HeapRegion *hr) : _hr(hr) { - _g1 = G1CollectedHeap::heap(); - }; - - void do_object(oop o) { - if (o != NULL) { - HeapWord *start = (HeapWord *) o; - size_t word_sz = o->size(); - gclog_or_tty->print("\nPrinting obj "PTR_FORMAT" of size " SIZE_FORMAT - " isMarkedPrev %d isMarkedNext %d isAllocSince %d\n", - (void*) o, word_sz, - _g1->isMarkedPrev(o), - _g1->isMarkedNext(o), - _hr->obj_allocated_since_prev_marking(o)); - HeapWord *end = start + word_sz; - HeapWord *cur; - int *val; - for (cur = start; cur < end; cur++) { - val = (int *) cur; - gclog_or_tty->print("\t "PTR_FORMAT":%d\n", val, *val); - } - } - } -}; - class VerifyRegionClosure: public HeapRegionClosure { private: bool _par;