comparison src/share/vm/gc_implementation/g1/g1RemSet.cpp @ 2188:c33825b68624

6923430: G1: assert(res != 0,"This should have worked.") 7007446: G1: expand the heap with a single step, not one region at a time Summary: Changed G1CollectedHeap::expand() to expand the committed space by calling VirtualSpace::expand_by() once rather than for every region in the expansion amount. This allows the success or failure of the expansion to be determined before creating any heap regions. Introduced a develop flag G1ExitOnExpansionFailure (false by default) that, when true, will exit the VM if the expansion of the committed space fails. Finally G1CollectedHeap::expand() returns a status back to it's caller so that the caller knows whether to attempt the allocation. Reviewed-by: brutisso, tonyp
author johnc
date Wed, 02 Feb 2011 10:41:20 -0800
parents f95d63e2154a
children 1216415d8e35
comparison
equal deleted inserted replaced
2187:986b2844f7a2 2188:c33825b68624
1 /* 1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
733 733
734 HeapWord* end = _ct_bs->addr_for(card_ptr + 1); 734 HeapWord* end = _ct_bs->addr_for(card_ptr + 1);
735 MemRegion dirtyRegion(start, end); 735 MemRegion dirtyRegion(start, end);
736 736
737 #if CARD_REPEAT_HISTO 737 #if CARD_REPEAT_HISTO
738 init_ct_freq_table(_g1->g1_reserved_obj_bytes()); 738 init_ct_freq_table(_g1->max_capacity());
739 ct_freq_note_card(_ct_bs->index_for(start)); 739 ct_freq_note_card(_ct_bs->index_for(start));
740 #endif 740 #endif
741 741
742 assert(!check_for_refs_into_cset || _cset_rs_update_cl[worker_i] != NULL, "sanity"); 742 assert(!check_for_refs_into_cset || _cset_rs_update_cl[worker_i] != NULL, "sanity");
743 UpdateRSOrPushRefOopClosure update_rs_oop_cl(_g1, 743 UpdateRSOrPushRefOopClosure update_rs_oop_cl(_g1,