/*
* 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 "gc_implementation/shared/markSweep.inline.hpp"
#include "gc_interface/collectedHeap.inline.hpp"
#include "memory/oopFactory.hpp"
#include "memory/permGen.hpp"
#include "memory/universe.inline.hpp"
#include "oops/constantPoolKlass.hpp"
#include "oops/constantPoolOop.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oop.inline2.hpp"
#include "oops/symbol.hpp"
#include "runtime/handles.inline.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_solaris
# include "thread_solaris.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_windows
# include "thread_windows.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
# include "thread_bsd.inline.hpp"
#endif
#ifndef SERIALGC
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
#include "memory/cardTableRS.hpp"
#include "oops/oop.pcgc.inline.hpp"
#endif
{
constantPoolOop c =
}
// only set to non-zero if constant pool is merged by RedefineClasses
pool->set_orig_length(0);
// if constant pool may change during RedefineClasses, it is created
// unsafe for GC concurrent processing.
// all fields are initialized; needed for GC
// Note: because we may be in this "conc_unsafe" state when allocating
// t_oop below, which may in turn cause a GC, it is imperative that our
// size be correct, consistent and henceforth stable, at this stage.
// initialize tag array
}
// Check that our size was stable at its old value.
return pool();
}
// Make sure size calculation is right
return k();
}
}
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// If the tags array is null we are in the middle of allocating this constant pool
// gc of constant pool contents
if (cp->is_pointer_entry(i)) {
}
base++;
}
// gc of constant pool instance variables
}
}
#ifndef SERIALGC
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// If the tags array is null we are in the middle of allocating this constant
// pool.
// gc of constant pool contents
if (cp->is_pointer_entry(i)) {
}
base++;
}
// gc of constant pool instance variables
}
}
#endif // SERIALGC
// Get size before changing pointers.
// Don't call size() or oop_size() since that is a virtual call.
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// If the tags array is null we are in the middle of allocating this constant
// pool.
if (cp->is_pointer_entry(i)) {
}
base++;
}
}
return size;
}
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// Get size before changing pointers.
// Don't call size() or oop_size() since that is a virtual call.
// If the tags array is null we are in the middle of allocating this constant
// pool.
if (cp->is_pointer_entry(i)) {
}
base++;
}
}
return size;
}
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::constantPoolKlassObj never moves.
// Get size before changing pointers.
// Don't call size() or oop_size() since that is a virtual call.
// If the tags array is null we are in the middle of allocating this constant
// pool.
if (cp->is_pointer_entry(i)) {
}
}
base++;
}
}
return size;
}
}
#ifndef SERIALGC
// If the tags array is null we are in the middle of allocating this constant
// pool.
if (cp->is_pointer_entry(i)) {
}
}
}
return cp->object_size();
}
if (cp->is_pointer_entry(i)) {
}
}
}
}
}
#endif // SERIALGC
// Printing
}
}
case JVM_CONSTANT_Class :
}
break;
case JVM_CONSTANT_Fieldref :
case JVM_CONSTANT_Methodref :
break;
case JVM_CONSTANT_String :
} else {
}
break;
case JVM_CONSTANT_Object :
break;
case JVM_CONSTANT_Integer :
break;
case JVM_CONSTANT_Float :
break;
case JVM_CONSTANT_Long :
index++; // Skip entry following eigth-byte constant
break;
case JVM_CONSTANT_Double :
index++; // Skip entry following eigth-byte constant
break;
case JVM_CONSTANT_NameAndType :
break;
case JVM_CONSTANT_Utf8 :
break;
case JVM_CONSTANT_UnresolvedClass : // fall-through
// unresolved_klass_at requires lock or safe world.
} else {
}
}
break;
case JVM_CONSTANT_MethodHandle :
break;
case JVM_CONSTANT_MethodType :
break;
case JVM_CONSTANT_InvokeDynamic :
{
if (argc > 0) {
}
}
}
break;
default:
break;
}
}
}
}
}
}
return "{constant pool}";
}
// Verification
if (!cp->partially_loaded()) {
}
} else if (tag.is_unresolved_klass()) {
}
} else if (tag.is_unresolved_string()) {
}
else {
}
if (!cp->has_pseudo_string()) {
"should be in permspace");
}
} else {
// can be non-perm, can be non-instance (array)
}
} else {
}
}
// Note: cache() can be NULL before a class is completely setup or
// in temporary constant pools used during constant pool merging
}
}
// Note: pool_holder() can be NULL in temporary constant pools
// used during constant pool merging
}
}
}
return cp->tags() == NULL || cp->pool_holder() == (klassOop) cp; // Check whether pool holder points to self
}
}
#ifndef PRODUCT
// CompileTheWorld support. Preload all classes loaded references in the passed in constantpool
// This will force loading of the class
// Force initialization of class
}
}
}
}
#endif