Mercurial > hg > graal-jvmci-8
diff src/share/vm/gc_implementation/g1/heapRegion.cpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | c38f13903fdf 8fbf05030e24 |
children | ff4fa8b0516e |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegion.cpp Mon Nov 12 18:11:17 2012 +0100 +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp Mon Nov 12 23:14:12 2012 +0100 @@ -40,7 +40,7 @@ size_t HeapRegion::CardsPerRegion = 0; HeapRegionDCTOC::HeapRegionDCTOC(G1CollectedHeap* g1, - HeapRegion* hr, OopClosure* cl, + HeapRegion* hr, ExtendedOopClosure* cl, CardTableModRefBS::PrecisionStyle precision, FilterKind fk) : ContiguousSpaceDCTOC(hr, cl, precision, NULL), @@ -83,8 +83,8 @@ void print_object(outputStream* out, oop obj) { #ifdef PRODUCT - klassOop k = obj->klass(); - const char* class_name = instanceKlass::cast(k)->external_name(); + Klass* k = obj->klass(); + const char* class_name = InstanceKlass::cast(k)->external_name(); out->print_cr("class name %s", class_name); #else // PRODUCT obj->print_on(out); @@ -213,10 +213,10 @@ void HeapRegionDCTOC::walk_mem_region_with_cl(MemRegion mr, HeapWord* bottom, HeapWord* top, - OopClosure* cl) { + ExtendedOopClosure* cl) { G1CollectedHeap* g1h = _g1; int oop_size; - OopClosure* cl2 = NULL; + ExtendedOopClosure* cl2 = NULL; FilterIntoCSClosure intoCSFilt(this, g1h, cl); FilterOutOfRegionClosure outOfRegionFilt(_hr, cl); @@ -476,10 +476,6 @@ return low; } -void HeapRegion::initialize(MemRegion mr, bool clear_space, bool mangle_space) { - G1OffsetTableContigSpace::initialize(mr, false, mangle_space); - hr_clear(false/*par*/, clear_space); -} #ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away #pragma warning( disable:4355 ) // 'this' : used in base member initializer list #endif // _MSC_VER @@ -487,8 +483,8 @@ HeapRegion::HeapRegion(uint hrs_index, G1BlockOffsetSharedArray* sharedOffsetArray, - MemRegion mr, bool is_zeroed) : - G1OffsetTableContigSpace(sharedOffsetArray, mr, is_zeroed), + MemRegion mr) : + G1OffsetTableContigSpace(sharedOffsetArray, mr), _hrs_index(hrs_index), _humongous_type(NotHumongous), _humongous_start_region(NULL), _in_collection_set(false), @@ -507,7 +503,7 @@ _orig_end = mr.end(); // Note that initialize() will set the start of the unmarked area of the // region. - this->initialize(mr, !is_zeroed, SpaceDecorator::Mangle); + hr_clear(false /*par*/, false /*clear_space*/); set_top(bottom()); set_saved_mark(); @@ -535,7 +531,7 @@ set_saved_mark(); } -void HeapRegion::oops_in_mr_iterate(MemRegion mr, OopClosure* cl) { +void HeapRegion::oops_in_mr_iterate(MemRegion mr, ExtendedOopClosure* cl) { HeapWord* p = mr.start(); HeapWord* e = mr.end(); oop obj; @@ -553,7 +549,7 @@ SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(HeapRegion_OOP_SINCE_SAVE_MARKS_DEFN) -void HeapRegion::oop_before_save_marks_iterate(OopClosure* cl) { +void HeapRegion::oop_before_save_marks_iterate(ExtendedOopClosure* cl) { oops_in_mr_iterate(MemRegion(bottom(), saved_mark_word()), cl); } @@ -801,10 +797,10 @@ if (!g1->is_obj_dead_cond(obj, this, vo)) { if (obj->is_oop()) { - klassOop klass = obj->klass(); - if (!klass->is_perm()) { + Klass* klass = obj->klass(); + if (!klass->is_metadata()) { gclog_or_tty->print_cr("klass "PTR_FORMAT" of object "PTR_FORMAT" " - "not in perm", klass, obj); + "not metadata", klass, obj); *failures = true; return; } else if (!klass->is_klass()) { @@ -814,7 +810,7 @@ return; } else { vl_cl.set_containing_obj(obj); - obj->oop_iterate(&vl_cl); + obj->oop_iterate_no_header(&vl_cl); if (vl_cl.failures()) { *failures = true; } @@ -908,14 +904,6 @@ // G1OffsetTableContigSpace code; copied from space.cpp. Hope this can go // away eventually. -void G1OffsetTableContigSpace::initialize(MemRegion mr, bool clear_space, bool mangle_space) { - // false ==> we'll do the clearing if there's clearing to be done. - ContiguousSpace::initialize(mr, false, mangle_space); - _offsets.zero_bottom_entry(); - _offsets.initialize_threshold(); - if (clear_space) clear(mangle_space); -} - void G1OffsetTableContigSpace::clear(bool mangle_space) { ContiguousSpace::clear(mangle_space); _offsets.zero_bottom_entry(); @@ -983,11 +971,14 @@ G1OffsetTableContigSpace:: G1OffsetTableContigSpace(G1BlockOffsetSharedArray* sharedOffsetArray, - MemRegion mr, bool is_zeroed) : + MemRegion mr) : _offsets(sharedOffsetArray, mr), _par_alloc_lock(Mutex::leaf, "OffsetTableContigSpace par alloc lock", true), _gc_time_stamp(0) { _offsets.set_space(this); - initialize(mr, !is_zeroed, SpaceDecorator::Mangle); + // false ==> we'll do the clearing if there's clearing to be done. + ContiguousSpace::initialize(mr, false, SpaceDecorator::Mangle); + _offsets.zero_bottom_entry(); + _offsets.initialize_threshold(); }