/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/systemDictionary.hpp"
#include "gc_implementation/shared/markSweep.inline.hpp"
#include "gc_interface/collectedHeap.inline.hpp"
#include "interpreter/oopMapCache.hpp"
#include "memory/gcLocker.hpp"
#include "oops/constantPoolOop.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/instanceMirrorKlass.hpp"
#include "oops/instanceKlassKlass.hpp"
#include "oops/instanceRefKlass.hpp"
#include "oops/objArrayKlassKlass.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oop.inline2.hpp"
#include "oops/symbol.hpp"
#include "oops/typeArrayOop.hpp"
#include "prims/jvmtiExport.hpp"
#include "runtime/fieldDescriptor.hpp"
#ifndef SERIALGC
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
#include "memory/cardTableRS.hpp"
#include "oops/oop.pcgc.inline.hpp"
#endif
#include "runtime/atomic.hpp"
// Make sure size calculation is right
return k();
}
}
}
OopClosure* closure) {
}
}
}
{
}
}
// We do not follow adr_implementor() here. It is followed later
// in instanceKlass::follow_weak_klass_links()
}
#ifndef SERIALGC
}
// We do not follow adr_implementor() here. It is followed later
// in instanceKlass::follow_weak_klass_links()
}
#endif // SERIALGC
// Get size before changing pointers.
// Don't call size() or oop_size() since that is a virtual call.
}
}
return size;
}
// Get size before changing pointers.
// Don't call size() or oop_size() since that is a virtual call.
return size;
}
}
}
}
#ifndef SERIALGC
}
}
}
}
}
"must be instance klass");
}
// embedded oops
}
}
return ik->object_size();
}
#endif // SERIALGC
int static_field_size,
unsigned nonstatic_oop_map_count,
const int nonstatic_oop_map_size =
} else {
}
if (access_flags.is_interface()) {
}
if (!host_klass.is_null()) {
}
// Allocation
KlassHandle k;
// regular klass
} else {
// Class
}
} else {
// reference klass
}
{
// The sizes of these these three variables are used for determining the
// size of the instanceKlassOop. It is critical that these are set to the right
// sizes before the first GC, i.e., when we allocate the mirror.
ik->init_implementor();
ik->set_is_marked_dependent(false);
// initialize the non-header words to zero
}
// To get verify to work - must be set to partial loaded before first GC point.
k()->set_partially_loaded();
}
return k();
}
#ifndef PRODUCT
// Printing
static const char* state_names[] = {
"unparseable_by_gc", "allocated", "loaded", "linked", "being_initialized", "fully_initialized", "initialization_error"
};
int n;
if (n < MaxSubklassPrintSize) {
}
}
if (ik->is_interface()) {
}
}
if (Verbose) {
}
}
}
}
}
{
// PreviousVersionInfo objects returned via PreviousVersionWalker
// contain a GrowableArray of handles. We have to clean up the
// GrowableArray _after_ the PreviousVersionWalker destructor
// has destroyed the handles.
{
bool have_pv = false;
if (!have_pv)
have_pv = true;
}
} // pvw is cleaned up
} // rm is cleaned up
}
st->print(BULLET"vtable length %d (start addr: " INTPTR_FORMAT ")", ik->vtable_length(), ik->start_of_vtable()); st->cr();
st->print(BULLET"itable length %d (start addr: " INTPTR_FORMAT ")", ik->itable_length(), ik->start_of_itable()); st->cr();
map++;
}
}
#endif //PRODUCT
}
return "{instance class}";
}
// Verification
protected:
template <class T> void do_oop_work(T* p) {
}
public:
};
if (!obj->partially_loaded()) {
#ifndef PRODUCT
// Avoid redundant verifies
#endif
// Verify that klass is present in SystemDictionary
}
// Verify static fields
// Verify vtables
// $$$ This used to be done only for m/s collections. Doing it
// always seemed a valid generalization. (DLD -- 6/00)
}
// Verify oop map cache
}
// Verify first subklass
}
// Verify siblings
int sib_count = 0;
}
if (sib_count >= 100000) {
}
}
// Verify implementor fields
guarantee(!Klass::cast(klassOop(im))->is_interface() || im == ik->as_klassOop(), "implementors cannot be interfaces");
}
// Verify local interfaces
int j;
for (j = 0; j < local_interfaces->length(); j++) {
}
// Verify transitive interfaces
for (j = 0; j < transitive_interfaces->length(); j++) {
guarantee(e->is_klass() && Klass::cast(klassOop(e))->is_interface(), "invalid transitive interface");
}
// Verify methods
}
}
// Verify method ordering
(UseSharedSpaces && length != 0)) {
for (j = 0; j < length; j++) {
sum += original_index;
}
// Verify sum of indices 0,1,...,length-1
} else {
}
// Verify JNI static field identifiers
}
// Verify other fields
}
}
}
}
}
}
}
}
}
}
}
return ik->transitive_interfaces() == (objArrayOop) obj; // Check whether transitive_interfaces points to self
}
// The transitive_interfaces is the last field set when loading an object.
// Set the layout helper to a place-holder value, until fuller initialization.
// (This allows asserts in oop_is_instance to succeed.)
ik->set_transitive_interfaces((objArrayOop) obj); // Temporarily set transitive_interfaces to point to self
}