universe.hpp revision 481
4848N/A * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 4848N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4848N/A * This code is free software; you can redistribute it and/or modify it 4848N/A * under the terms of the GNU General Public License version 2 only, as 4848N/A * published by the Free Software Foundation. 4848N/A * This code is distributed in the hope that it will be useful, but WITHOUT 4848N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4848N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4848N/A * version 2 for more details (a copy is included in the LICENSE file that 4848N/A * You should have received a copy of the GNU General Public License version 4848N/A * 2 along with this work; if not, write to the Free Software Foundation, 4848N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4848N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 4848N/A * CA 95054 USA or visit www.sun.com if you need additional information or 4848N/A// Universe is a name space holding known system classes and objects in the VM. 4848N/A// Loaded classes are accessible through the SystemDictionary. 4848N/A// The object heap is allocated and accessed through Universe, and various allocation 4848N/A// support is provided. Allocation by the interpreter and compiled code is done inline 4848N/A// and bails out to Scavenge::invoke_and_allocate. 4848N/A// Common parts of a methodOop cache. This cache safely interacts with 4848N/A // We save the klassOop and the idnum of methodOop in order to get // the current cached methodOop. // A helper class for caching a methodOop when the user of the cache // cares about all versions of the methodOop. // This subclass adds weak references to older versions of the // methodOop and a query method for a methodOop. // If the cached methodOop has not been redefined, then // _prev_methods will be NULL. If all of the previous // versions of the method have been collected, then // _prev_methods can have a length of zero. // A helper class for caching a methodOop when the user of the cache // only cares about the latest version of the methodOop. // This subclass adds a getter method for the latest methodOop. // Ugh. Universe is much too friendly. // Known classes in the VM // Known objects in the VM // array of preallocated error objects with backtrace // number of preallocated error objects available for use // The object used as an exception dummy when exceptions are thrown for // The particular choice of collected heap. // Base address for oop-within-java-object materialization. // NULL if using wide oops. Doubles as heap oop null value. // array of dummy objects used with +FullGCAlot // index of next entry to clear // the array of preallocated errors with backtraces // generate an out of memory error; if possible using an error with preallocated backtrace; // otherwise return the given default error. // Historic gc information // Mirrors for primitive classes (created eagerly) // True during call to verify(). Should only be set/cleared in verify(). // Known classes in the VM // Known objects in tbe VM // OutOfMemoryError support. Returns an error with the required message. The returned error // may or may not have a backtrace. If error has a backtrace then the stack trace is already // Accessors needed for fast allocation // The particular choice of collected heap. // Historic gc information // Apply "f" to the addresses of all the direct heap pointers maintained // as static fields of "Universe". // Apply "f" to all klasses for basic types (classes not present in // Apply "f" to all system klasses (classes not present in SystemDictionary). // For sharing -- fill in a list of known vtable pointers. // Change the number of dummy objects kept reachable by the full gc dummy // array; this should trigger relocation in a sliding compaction collector. // Oop verification (see MacroAssembler::verify_oop) // Flushing and deoptimization // Flushing and deoptimization in case of evolution // Support for fullspeed debugging