Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/concurrentG1Refine.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 | 04d1138b4cce |
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. |
97 | 97 |
98 void ConcurrentG1Refine::init() { | 98 void ConcurrentG1Refine::init() { |
99 if (G1ConcRSLogCacheSize > 0) { | 99 if (G1ConcRSLogCacheSize > 0) { |
100 _g1h = G1CollectedHeap::heap(); | 100 _g1h = G1CollectedHeap::heap(); |
101 _max_n_card_counts = | 101 _max_n_card_counts = |
102 (unsigned) (_g1h->g1_reserved_obj_bytes() >> CardTableModRefBS::card_shift); | 102 (unsigned) (_g1h->max_capacity() >> CardTableModRefBS::card_shift); |
103 | 103 |
104 size_t max_card_num = ((size_t)1 << (sizeof(unsigned)*BitsPerByte-1)) - 1; | 104 size_t max_card_num = ((size_t)1 << (sizeof(unsigned)*BitsPerByte-1)) - 1; |
105 guarantee(_max_n_card_counts < max_card_num, "card_num representation"); | 105 guarantee(_max_n_card_counts < max_card_num, "card_num representation"); |
106 | 106 |
107 int desired = _max_n_card_counts / InitialCacheFraction; | 107 int desired = _max_n_card_counts / InitialCacheFraction; |