compactingPermGenGen.hpp revision 1879
4770N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 4770N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4586N/A * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any // All heaps contains a "permanent generation," containing permanent // (reflective) objects. This is like a regular generation in some ways, // but unlike one in others, and so is split apart. // This is the "generation" view of a CompactingPermGen. // NOTE: the shared spaces used for CDS are here handled in // a somewhat awkward and potentially buggy fashion, see CR 6801625. // This infelicity should be fixed, see CR 6897789. // Abstractly, this is a subtype that gets access to protected fields. // With shared spaces there is a dichotomy in the use of the // _virtual_space of the generation. There is a portion of the // _virtual_space that is used for the unshared part of the // permanent generation and a portion that is reserved for the shared part. // The _reserved field in the generation represents both the // unshared and shared parts of the generation. The _reserved // variable is initialized for only the unshared part but is // later extended to include the shared part during initialization // if shared spaces are being used. // The reserved size for the _virtual_space for CompactingPermGenGen // is the size of the space for the permanent generation including the // the shared spaces. This can be seen by the use of MaxPermSize // in the allocation of PermanentGenerationSpec. The space for the // shared spaces is committed separately (???). // In general at initialization only a part of the // space for the unshared part of the permanent generation is // committed and more is committed as the permanent generation is // grown. In growing the permanent generation the capacity() and // max_capacity() of the generation are used. For the permanent // generation (implemented with a CompactingPermGenGen) the capacity() // is taken from the capacity of the space (_the_space variable used for the // unshared part of the generation) and the max_capacity() is based // on the size of the _reserved variable (which includes the size of the // shared spaces) minus the size of the shared spaces. // These values are redundant, but are called out separately to avoid // List of klassOops whose vtbl entries are used to patch others. vtbl_list_size =
16,
// number of entries in the shared space vtable list. num_virtuals =
200 // number of virtual methods in Klass (or // subclass) objects, or greater. ro = 0,
// read-only shared space in the heap rw =
1,
// read-write shared space in the heap md =
2,
// miscellaneous data for initializing tables, etc. mc =
3,
// miscellaneous code - vtable replacement. const char*
name()
const {
return "compacting perm gen";
// Return the maximum capacity for the object space. This // explicitly does not include the shared spaces. assert(
false,
"Should not call this -- handled at PermGen level.");
// RedefineClasses note: this tester is used to check residence of // the specified oop in the shared readonly space and not whether // RedefineClasses note: this tester is used to check residence of // the specified oop in the shared readwrite space and not whether inline bool is_in(
const void* p)
const {
// Initiate dumping of shared file. // JVM/TI RedefineClasses() support: // Remap the shared readonly space to shared readwrite, private if // sharing is enabled. Simply returns true if sharing is not enabled // or if the remapping has already been done by a prior call. #
endif // SHARE_VM_MEMORY_COMPACTINGPERMGENGEN_HPP