oop.hpp revision 2765
2099N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// oopDesc is the top baseclass for objects classes. The {name}Desc classes describe 0N/A// the format of Java objects so the fields can be accessed from C++. 0N/A// oopDesc is abstract. 0N/A// (see oopHierarchy for complete oop class hierarchy) 0N/A// no virtual functions allowed 0N/A// store into oop with store check 0N/A// store into oop without store check 0N/A// Forward declarations. 0N/A // Fast access to barrier set. Must be initialized. 0N/A // Used only to re-initialize the mark word (e.g., of promoted 0N/A // objects during a GC) -- requires a valid klass pointer 167N/A // For klass field compression 0N/A // For when the klass pointer is being used as a linked list "next" field. 113N/A // size of object header, aligned to platform wordSize 0N/A // Returns whether this is an instance of k or an instance of a subclass of k 0N/A // Returns the actual oop size of the object 0N/A // Sometimes (for complicated concurrency-related reasons), it is useful 0N/A // to be able to figure out the size of an object knowing its klass. 0N/A // Some perm gen objects are not parseble immediately after 0N/A // installation of their klass pointer. 518N/A // Some perm gen objects that have been allocated and initialized 518N/A // can be changed by the VM when not at a safe point (class rededfinition 518N/A // is an example). Such objects should not be examined by the 518N/A // concurrent processing of a garbage collector if is_conc_safe() 0N/A // field addresses in oop 113N/A // Need this as public for garbage collection. 113N/A // Decode an oop pointer from a narrowOop if compressed. 113N/A // These are overloaded for oop and narrowOop as are the other functions 113N/A // below so that they can be called in template functions. 113N/A // Encode an oop pointer to a narrow oop. The or_null versions accept 113N/A // null oop pointer, others do not in order to eliminate the 113N/A // null checking branches. 113N/A // Load an oop out of the Java heap 113N/A // Load an oop out of Java heap and decode it to an uncompressed oop. 113N/A // Store an oop into the heap. 113N/A // Encode oop if UseCompressedOops and store into the heap. 113N/A // Access to fields in a instanceOop through these methods. 0N/A // printing functions for VM debugging 0N/A // printing on default output stream 0N/A // return the print strings 0N/A // verification operations 0N/A // tells whether this oop is partially constructed (gc during class loading) 0N/A // locking operations 0N/A // garbage collection 0N/A // Apply "MarkSweep::mark_and_push" to (the address of) every non-NULL 0N/A // reference field in "this". 0N/A // Parallel Scavenge 0N/A // Forward pointer operations for scavenge 0N/A // Like "forward_to", but inserts the forwarding pointer atomically. 0N/A // Exactly one thread succeeds in inserting the forwarding pointer, and 0N/A // this call returns "NULL" for that thread; any other thread has the 0N/A // value of the forwarding pointer returned and does not modify "this". 0N/A // Age of object during scavenge 0N/A // Adjust all pointers in this object to point at it's forwarded location and 0N/A // return the size of this oop. This is used by the MarkSweep collector. 0N/A // mark-sweep support 0N/A // Fast access to barrier set 0N/A // iterators, returns size of object 0N/A // identity hash; returns the identity hash key (computes it if necessary) 0N/A // NOTE with the introduction of UseBiasedLocking that identity_hash() might reach a 0N/A // safepoint if called on a biased object. Calling code must be aware of that. 0N/A // marks are forwarded to stack when object is locked 0N/A // for code generation 1879N/A#
endif // SHARE_VM_OOPS_OOP_HPP