--- old/src/share/vm/gc/g1/g1CollectedHeap.cpp 2015-11-05 13:45:01.586429788 +0100 +++ new/src/share/vm/gc/g1/g1CollectedHeap.cpp 2015-11-05 13:45:01.490429312 +0100 @@ -366,7 +366,7 @@ // we can update top of the "starts humongous" region. first_hr->set_top(MIN2(first_hr->end(), obj_top)); if (_hr_printer.is_active()) { - _hr_printer.alloc(G1HRPrinter::StartsHumongous, first_hr, first_hr->end()); + _hr_printer.alloc(G1HRPrinter::StartsHumongous, first_hr, first_hr->top()); } // Now, we will update the top fields of the "continues humongous" @@ -1128,10 +1128,9 @@ // We'll assert that the strong code root list and RSet is empty assert(hrrs->strong_code_roots_list_length() == 0, "sanity"); assert(hrrs->occupied() == 0, "RSet should be empty"); - return false; + } else { + hrrs->clear(); } - - hrrs->clear(); // You might think here that we could clear just the cards // corresponding to the used region. But no: if we leave a dirty card // in a region we might allocate into, then it would prevent that card @@ -5759,7 +5758,7 @@ next_bitmap->clear(r->bottom()); } do { - HeapRegion* next = g1h->next_humongous_region(r); + HeapRegion* next = g1h->next_region_in_humongous(r); _freed_bytes += r->used(); r->set_containing_set(NULL); _humongous_regions_removed.increment(1u, r->capacity());