325N/A * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 325N/A * This code is free software; you can redistribute it and/or modify it 325N/A * under the terms of the GNU General Public License version 2 only, as 325N/A * published by the Free Software Foundation. 325N/A * This code is distributed in the hope that it will be useful, but WITHOUT 325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 325N/A * version 2 for more details (a copy is included in the LICENSE file that 325N/A * accompanied this code). 325N/A * You should have received a copy of the GNU General Public License version 325N/A * 2 along with this work; if not, write to the Free Software Foundation, 325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 325N/A // Mangle all of the the initial generation. // By default we get a single threaded default reference processor; // generations needing multi-threaded refs processing or discovery override this method. st->
print_cr(
"[Accumulated GC generation %d time %3.7f secs, " "%d GC's, avg GC time %3.7f]",
// Utility iterator classes "Wrong youngest generation type");
// The largest number of contiguous free words in this or any higher generation. // Ignores "ref" and calls allocate(). #
endif // #ifndef PRODUCT // Could do a bad general impl here that gets a lock. But no. // Could do a bad general impl here that gets a lock. But no. guarantee(
false,
"No good general implementation.");
// Some of these are mediocre general implementations. Should be // overridden to get better performance. // Generic implementation, can be specialized // Note that this is done over all spaces, not just the compactible // Verify that the start and end of this generation is the start of a card. // If this wasn't true, a single card could span more than on generation, // which would cause problems when we commit/uncommit memory, and when we // clear and dirty cards. // Don't check at the very end of the heap as we'll assert that we're probing off return true;
// That's what grow_by(0) would return // The alignment caused the number of bytes to wrap. An expand_by(0) will // return true with the implication that an expansion was done when it // was not. A call to expand implies a best effort to expand by "bytes" // but not a guarantee. Align down to give a best effort. This is likely // the most that the generation can expand since it has some capacity to // No young generation references, clear this generation's cards. // Objects in this generation may have moved, invalidate this // Currently nothing to do. // Temporarily expand the span of our ref processor, so // refs discovery is over the entire heap, not just this generation assert(!
is_tlab,
"OneContigSpaceCardGeneration does not support TLAB allocation");
// If there's not enough expansion space available, give up. // Expand shared block offset array // Expand space -- also expands space's BOT // (which uses (part of) shared array above) // update the space and generation capacity counters // Shrink committed space // Shrink space; this also shrinks the space's BOT // Shrink the shared block offset array // Currently nothing to do. // Override for a card-table generation with one contiguous // space. NOTE: For reasons that are lost in the fog of history, // this code is used when you iterate over perm gen objects, // even when one uses CDS, where the perm gen has a couple of // other spaces; this is because CompactingPermGenGen derives // from OneContigSpaceCardGeneration. This should be cleaned up, // Deal with delayed initialization of _the_space, // and lack of initialization of _last_gc. // update the generation and space performance counters