/*
* 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/classLoader.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
#include "code/codeCache.hpp"
#include "code/dependencies.hpp"
#include "gc_interface/collectedHeap.inline.hpp"
#include "interpreter/interpreter.hpp"
#include "memory/cardTableModRefBS.hpp"
#include "memory/filemap.hpp"
#include "memory/gcLocker.inline.hpp"
#include "memory/genCollectedHeap.hpp"
#include "memory/genRemSet.hpp"
#include "memory/generation.hpp"
#include "memory/oopFactory.hpp"
#include "memory/permGen.hpp"
#include "memory/universe.hpp"
#include "memory/universe.inline.hpp"
#include "oops/arrayKlassKlass.hpp"
#include "oops/compiledICHolderKlass.hpp"
#include "oops/constMethodKlass.hpp"
#include "oops/constantPoolKlass.hpp"
#include "oops/constantPoolOop.hpp"
#include "oops/cpCacheKlass.hpp"
#include "oops/cpCacheOop.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/instanceMirrorKlass.hpp"
#include "oops/instanceKlassKlass.hpp"
#include "oops/instanceRefKlass.hpp"
#include "oops/klassKlass.hpp"
#include "oops/klassOop.hpp"
#include "oops/methodDataKlass.hpp"
#include "oops/methodKlass.hpp"
#include "oops/objArrayKlassKlass.hpp"
#include "oops/oop.inline.hpp"
#include "oops/typeArrayKlass.hpp"
#include "oops/typeArrayKlassKlass.hpp"
#include "prims/jvmtiRedefineClassesTrace.hpp"
#include "runtime/aprofiler.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/fprofiler.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/synchronizer.hpp"
#include "runtime/vm_operations.hpp"
#include "services/memoryService.hpp"
#include "utilities/events.hpp"
#include "utilities/hashtable.inline.hpp"
#include "utilities/preserveException.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/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1CollectorPolicy.hpp"
#endif
// Known objects
// These variables are guarded by FullGCALot_lock.
// Heap
f(boolArrayKlassObj());
f(byteArrayKlassObj());
f(charArrayKlassObj());
f(intArrayKlassObj());
f(shortArrayKlassObj());
f(longArrayKlassObj());
f(singleArrayKlassObj());
f(doubleArrayKlassObj());
}
f(methodKlassObj());
f(constMethodKlassObj());
f(methodDataKlassObj());
f(klassKlassObj());
f(arrayKlassKlassObj());
f(objArrayKlassKlassObj());
f(typeArrayKlassKlassObj());
f(instanceKlassKlassObj());
f(constantPoolKlassObj());
f(systemObjArrayKlassObj());
}
// It's important to iterate over these guys even if they are null,
// since that's how shared heaps are restored.
}
// %%% Consider moving those "shared oops" over here with the others.
{
for (int i = 0; i < T_VOID+1; i++) {
if (_typeArrayKlassObjs[i] != NULL) {
} else if (do_all) {
}
}
}
_pd_implies_cache->oops_do(f);
}
}
}
}
// determine base vtable size; without that we cannot create the array klasses
if (!UseSharedSpaces) {
_systemObjArrayKlassObj = objArrayKlassKlass::cast(objArrayKlassKlassObj())->allocate_system_objArray_klass(CHECK);
}
}
if (UseSharedSpaces) {
// Verify shared interfaces array.
// Verify element klass for system obj array klass
// Verify super class for the classes created above
} else {
// Set up shared interfaces array. (Do this before supers are set up.)
// Set element klass for system obj array klass
// Set super class for the classes created above
}
} // end of core bootstrapping
// Initialize _objectArrayKlass after core bootstraping to make
// sure the super class is set up properly for _objectArrayKlass.
// Add the class to the class hierarchy manually to make sure that
// its vtable is initialized after core bootstrapping is completed.
// Compute is_jdk version flags.
// Only 1.3 or later has the java.lang.Shutdown class.
// Only 1.4 or later has the java.lang.CharSequence interface.
// Only 1.5 or later has the java.lang.management.MemoryUsage class.
if (JDK_Version::is_partially_initialized()) {
CLEAR_PENDING_EXCEPTION; // ignore exceptions
if (k == NULL) {
CLEAR_PENDING_EXCEPTION; // ignore exceptions
if (k == NULL) {
CLEAR_PENDING_EXCEPTION; // ignore exceptions
if (k == NULL) {
jdk_version = 2;
} else {
jdk_version = 3;
}
} else {
jdk_version = 4;
}
} else {
jdk_version = 5;
}
}
#ifdef ASSERT
if (FullGCALot) {
// Allocate an array of dummy objects.
// We'd like these to be at the bottom of the old generation,
// so that when we free one and then collect,
// (almost) the whole heap moves
// and we find out if we actually update all the oops correctly.
// But we can't allocate directly in the old generation,
// so we allocate wherever, and hope that the first collection
// moves these objects to the bottom of the old generation.
// We can allocate directly in the permanent generation, so we do.
int size;
if (UseConcMarkSweepGC) {
warning("Using +FullGCALot with concurrent mark sweep gc "
"will not force all objects to relocate");
} else {
}
int i = 0;
while (i < size) {
if (!UseConcMarkSweepGC) {
// Allocate dummy in old generation
}
// Allocate dummy in permanent generation
oop dummy = instanceKlass::cast(SystemDictionary::Object_klass())->allocate_permanent_instance(CHECK);
}
{
// Only modify the global variable inside the mutex.
// If we had a race to here, the other dummy_array instances
// and their elements just get dropped on the floor, which is fine.
if (_fullgc_alot_dummy_array == NULL) {
}
}
}
#endif
}
return *(void**)addr;
}
}
int n = 0;
#ifndef PRODUCT
// In non-product builds CHeapObj is derived from AllocatedObj,
// so symbols in CDS archive should have their vtable pointer patched.
#endif
}
public:
// We will never reach the CATCH below since Exceptions::_throw will cause
// the VM to exit if an exception is thrown during initialization
// This call unconditionally creates a new mirror for k,
// and links in k's component_mirror field if k is an array.
// If k is an objArray, k's element type must already have
// a mirror. In other words, this closure must process
// the component type of an objArray k before it processes k.
// This works because the permgen iterator presents arrays
// and their component types in order of creation.
}
}
};
if (UseSharedSpaces) {
} else {
//_mirrors[T_OBJECT] = instanceKlass::cast(_object_klass)->java_mirror();
//_mirrors[T_ARRAY] = instanceKlass::cast(_object_klass)->java_mirror();
}
}
// Bootstrap problem: all classes gets a mirror (java.lang.Class instance) assigned eagerly,
// but we cannot do that for classes created before java.lang.Class is loaded. Here we simply
// walk over permanent objects created so far (mostly classes) and fixup their mirrors. Note
// that the number of objects allocated at this point is very small.
// Cache the start of the static fields
}
static bool has_run_finalizers_on_exit = false;
if (has_run_finalizers_on_exit) return;
has_run_finalizers_on_exit = true;
// Called on VM exit. This ought to be run in a separate thread.
{
&result,
);
// Ignore any pending exceptions
}
}
// initialize_vtable could cause gc if
// 1) we specified true to initialize_vtable and
// 2) this ran after gc was enabled
// In case those ever change we use handles for oops
// init vtable of k and all subclasses
if (ko->oop_is_instance()) {
for (KlassHandle s_h(THREAD, ik->subklass()); s_h() != NULL; s_h = (THREAD, s_h()->klass_part()->next_sibling())) {
}
}
}
}
}
}
// never attempt to fill in the stack trace of preallocated errors that do not have
// backtrace. These errors are kept alive forever and may be "re-used" when all
// preallocated errors with backtrace have been consumed. Also need to avoid
// a potential loop which could happen if an out of memory occurs when attempting
// to allocate the backtrace.
}
// generate an out of memory error:
// - if there is a preallocated error with backtrace available then return it wth
// a filled in stack trace.
// - if there are no preallocated errors with backtrace available then return
// an error without backtrace.
int next;
} else {
next = -1;
}
if (next < 0) {
// all preallocated errors have been used.
// return default
return default_err;
} else {
// get the error object at the slot and set set it to NULL so that the
// array isn't keeping it alive anymore.
// use the message from the default error
// populate the stack trace and return it.
return exc;
}
}
// Neither the high bits nor the low bits of this value is allowed
// to look like (respectively) the high or low bits of a real oop.
//
// High and low are CPU-specific notions, but low always includes
// the low-order bit. Since oops are always aligned at least mod 4,
// setting the low-order bit will ensure that the low half of the
// word will never look like that of a real oop.
//
// Using the OS-supplied non-memory-address word (usually 0 or -1)
// will take care of the high bits, however many there are.
if (non_oop_bits == 0) {
}
return (void*)non_oop_bits;
}
"LogHeapWordSize is incorrect.");
"oop size is not not a multiple of HeapWord size");
// Get map info from shared archive file.
if (DumpSharedSpaces)
UseSharedSpaces = false;
if (UseSharedSpaces) {
// Open the shared archive file, read and validate the header. If
// initialization files, shared spaces [UseSharedSpaces] are
// disabled and the file is closed.
if (mapinfo->initialize()) {
} else {
"archive file not closed or shared spaces not disabled.");
}
}
return status;
}
// We have a heap so create the methodOop caches before
// CompactingPermGenGen::initialize_oops() tries to populate them.
if (UseSharedSpaces) {
// Read the data structures supporting the shared spaces (shared
// system dictionary, symbol table, etc.). After that, access to
// the file (other than the mapped regions) is no longer needed, and
// the file is closed. Closing the file does not affect the
// currently mapped regions.
} else {
}
return JNI_OK;
}
// Choose the heap base address and oop encoding mode
// when compressed oops are used:
// Unscaled - Use 32-bits oops without encoding when
// NarrowOopHeapBaseMin + heap_size < 4Gb
// ZeroBased - Use zero based compressed oops with encoding when
// NarrowOopHeapBaseMin + heap_size < 32Gb
// HeapBased - Use compressed oops with heap base + encoding.
// 4Gb
// 32Gb
// OopEncodingHeapMax == NarrowOopHeapMax << LogMinObjAlignmentInBytes;
#ifdef _LP64
if (UseCompressedOops) {
mode == ZeroBasedNarrowOop ||
// Return specified base for the first request.
(Universe::narrow_oop_shift() == 0)) {
// Use 32-bits oops without encoding and
// place heap's top on the 4Gb boundary
} else {
// Can't reserve with NarrowOopShift == 0
if (mode == UnscaledNarrowOop ||
// Use zero based compressed oops with encoding and
// place heap's top on the 32Gb boundary in case
// total_size > 4Gb or failed to reserve below 4Gb.
}
}
} else {
// Can't reserve below 32Gb.
}
// Set narrow_oop_base and narrow_oop_use_implicit_null_checks
// used in ReservedHeapSpace() constructors.
// The final values will be set in initialize_heap() below.
// Use zero based compressed oops
// Don't need guard page for implicit checks in indexed
// addressing mode with zero based Compressed Oops.
} else {
// Set to a non-NULL value so the ReservedSpace ctor computes
// the correct no-access prefix.
// The final value will be set in initialize_heap() below.
#ifdef _WIN64
if (UseLargePages) {
// Cannot allocate guard pages for implicit checks in indexed
// addressing mode when large pages are specified on windows.
}
#endif // _WIN64
}
}
#endif
return (char*)base; // also return NULL (don't care) for 32-bit VM
}
if (UseParallelGC) {
#ifndef SERIALGC
#else // SERIALGC
fatal("UseParallelGC not supported in java kernel vm.");
#endif // SERIALGC
} else if (UseG1GC) {
#ifndef SERIALGC
#else // SERIALGC
fatal("UseG1GC not supported in java kernel vm.");
#endif // SERIALGC
} else {
if (UseSerialGC) {
gc_policy = new MarkSweepPolicy();
} else if (UseConcMarkSweepGC) {
#ifndef SERIALGC
if (UseAdaptiveSizePolicy) {
gc_policy = new ASConcurrentMarkSweepPolicy();
} else {
gc_policy = new ConcurrentMarkSweepPolicy();
}
#else // SERIALGC
fatal("UseConcMarkSweepGC not supported in java kernel vm.");
#endif // SERIALGC
} else { // default old generation
gc_policy = new MarkSweepPolicy();
}
}
return status;
}
#ifdef _LP64
if (UseCompressedOops) {
// Subtract a page because something can get allocated at heap base.
// This also makes implicit null checking work, because the
// memory+1 page below heap_base needs to cause a signal.
// See needs_explicit_null_check.
// Only set the heap base for compressed oops because it indicates
// compressed oops for pstack code.
if (verbose) {
}
// Can't reserve heap below 32Gb.
if (verbose) {
Universe::narrow_oop_base());
}
} else {
if (verbose) {
}
#ifdef _WIN64
if (!Universe::narrow_oop_use_implicit_null_checks()) {
// Don't need guard page for implicit checks in indexed addressing
// mode with zero based Compressed Oops.
}
#endif // _WIN64
// Can't reserve heap below 4Gb.
} else {
if (verbose) {
}
}
}
if (verbose) {
}
}
#endif
// We will never reach the CATCH below since Exceptions::_throw will cause
// the VM to exit if an exception is thrown during initialization
if (UseTLAB) {
"Should support thread-local allocation buffers");
}
return JNI_OK;
}
// It's the caller's repsonsibility to ensure glitch-freedom
// (if required).
}
switch (mode) {
case UnscaledNarrowOop:
return "32-bits Oops";
case ZeroBasedNarrowOop:
return "zero based Compressed Oops";
case HeapBasedNarrowOop:
return "Compressed Oops with base";
}
return "";
}
if (narrow_oop_base() != 0) {
return HeapBasedNarrowOop;
}
if (narrow_oop_shift() != 0) {
return ZeroBasedNarrowOop;
}
return UnscaledNarrowOop;
}
void universe2_init() {
}
// This function is defined in JVM.cpp
extern void initialize_converter_functions();
bool universe_post_init() {
if (!UseSharedSpaces) {
}
}
klassOop k;
if (!UseSharedSpaces) {
// Setup preallocated empty java.lang.Class array
Universe::_the_empty_class_klass_array = oopFactory::new_objArray(SystemDictionary::Class_klass(), 0, CHECK_false);
// Setup preallocated OutOfMemoryError errors
// Setup preallocated NullPointerException
// (this is currently used for a cheap & dirty solution in compiler exception handling)
k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_NullPointerException(), true, CHECK_false);
Universe::_null_ptr_exception_instance = instanceKlass::cast(k)->allocate_permanent_instance(CHECK_false);
// Setup preallocated ArithmeticException
// (this is currently used for a cheap & dirty solution in compiler exception handling)
k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_ArithmeticException(), true, CHECK_false);
Universe::_arithmetic_exception_instance = instanceKlass::cast(k)->allocate_permanent_instance(CHECK_false);
// Virtual Machine Error for when we get into a situation we can't resolve
if (!linked) {
return false; // initialization failed
}
}
if (!DumpSharedSpaces) {
// These are the only Java fields that are currently set during shared space dumping.
// We prefer to not handle this generally, so we always reinitialize these detail messages.
// Setup the array of errors that have preallocated backtrace
assert(k->klass_part()->name() == vmSymbols::java_lang_OutOfMemoryError(), "should be out of memory error");
Universe::_preallocated_out_of_memory_error_array = oopFactory::new_objArray(k_h(), len, CHECK_false);
for (int i=0; i<len; i++) {
}
}
// Setup static method for registering finalizers
// The finalizer klass must be linked before looking up the method, in
// case it needs to get rewritten.
"java.lang.ref.Finalizer.register", false);
}
// Resolve on first use and initialize class.
// Note: No race-condition here, since a resolve will always return the same result
// Setup method for security checks
"java.lang.reflect.Method.invoke", false);
}
// Setup method for registering loaded classes in class loader vector
m = instanceKlass::cast(SystemDictionary::ClassLoader_klass())->find_method(vmSymbols::addClass_name(), vmSymbols::class_void_signature());
"java.lang.ClassLoader.addClass", false);
}
// Setup method for checking protection domain
// Allow NULL which should only happen with bootstrapping.
if (m != NULL) {
if (m->is_static()) {
// NoSuchMethodException doesn't actually work because it tries to run the
// <init> function before java_lang_Class is linked. Print error and exit.
return false; // initialization failed
}
}
// The folowing is initializing converter functions for serialization in
// JVM.cpp. If we clean up the StrictMath code above we may want to find
// a better solution for this as well.
// it's an input to soft ref clearing policy.
{
MutexLocker x(Heap_lock);
}
// ("weak") refs processing infrastructure initialization
return true;
}
}
// %%% The Universe::flush_foo methods belong in CodeCache.
// Flushes compiled methods dependent on dependee.
if (CodeCache::number_of_nmethods_with_dependencies() == 0) return;
// CodeCache can only be updated by a thread_in_VM and they will all be
// stopped dring the safepoint so CodeCache will be safe to update without
// holding the CodeCache_lock.
// Compute the dependent nmethods
// At least one nmethod has been marked for deoptimization
}
}
// Flushes compiled methods dependent on a particular CallSite
// instance when its target is different than the given MethodHandle.
if (CodeCache::number_of_nmethods_with_dependencies() == 0) return;
// CodeCache can only be updated by a thread_in_VM and they will all be
// stopped dring the safepoint so CodeCache will be safe to update without
// holding the CodeCache_lock.
// Compute the dependent nmethods that have a reference to a
// CallSite object. We use instanceKlass::mark_dependent_nmethod
// directly instead of CodeCache::mark_for_deoptimization because we
// want dependents on the call site class only not all classes in
// the ContextStream.
int marked = 0;
{
}
if (marked > 0) {
// At least one nmethod has been marked for deoptimization
}
}
#ifdef HOTSWAP
// Flushes compiled methods dependent on dependee in the evolutionary sense
// --- Compile_lock is not held. However we are at a safepoint.
if (CodeCache::number_of_nmethods_with_dependencies() == 0) return;
// CodeCache can only be updated by a thread_in_VM and they will all be
// stopped dring the safepoint so CodeCache will be safe to update without
// holding the CodeCache_lock.
// Compute the dependent nmethods
// At least one nmethod has been marked for deoptimization
// All this already happens inside a VM_Operation, so we'll do all the work here.
// Stuff copied from VM_Deoptimize and modified slightly.
// We do not want any GCs to happen while we are in the middle of this VM operation
// Deoptimize all activations depending on marked nmethods
// Make the dependent methods not entrant (in VM_Deoptimize they are made zombies)
}
}
#endif // HOTSWAP
// Flushes compiled methods dependent on dependee
// --- Compile_lock is not held. However we are at a safepoint.
// CodeCache can only be updated by a thread_in_VM and they will all be
// stopped dring the safepoint so CodeCache will be safe to update without
// holding the CodeCache_lock.
// Compute the dependent nmethods
// At least one nmethod has been marked for deoptimization
// All this already happens inside a VM_Operation, so we'll do all the work here.
// Stuff copied from VM_Deoptimize and modified slightly.
// We do not want any GCs to happen while we are in the middle of this VM operation
// Deoptimize all activations depending on marked nmethods
// Make the dependent methods not entrant (in VM_Deoptimize they are made zombies)
}
}
}
if (!extended) {
} else {
}
}
if (PrintHeapAtSIGBREAK) {
}
}
heap()->total_collections(),
heap()->total_full_collections());
if (!PrintHeapAtGCExtended || ignore_extended) {
} else {
}
}
heap()->total_collections(),
heap()->total_full_collections());
if (!PrintHeapAtGCExtended || ignore_extended) {
} else {
}
}
if (SharedSkipVerify) {
return;
}
// The use of _verify_in_progress is a temporary work around for
// 6320749. Don't bother with a creating a class to set and clear
// it since it is only used in this method and the control flow is
// straight forward.
_verify_in_progress = true;
"DPT should not be active during verification "
"(of thread stacks below)");
)
SymbolTable::verify();
StringTable::verify();
{
}
JNIHandles::verify();
os::check_heap();
CodeCache::verify_oops();
_verify_in_progress = false;
}
// Oop verification (see MacroAssembler::verify_oop)
// decide which low-order bits we require to be clear:
// make an inclusive limit:
// throw away enough low-order bits to make the diff vanish
mask <<= 1;
// check an intermediate value between min and max, just to make sure:
// require address alignment, too:
}
verify_data[0] = mask;
}
// Oop verification (see MacroAssembler::verify_oop)
#ifndef PRODUCT
m.start(),
m.end());
return _verify_oop_data[0];
}
return _verify_oop_data[1];
}
/* $$$
// A klass can never live in the new space. Since the new and old
// spaces can change size, we must settle for bounds-checking against
// the bottom of the world, plus the smallest possible new and old
// space sizes that may arise during execution.
size_t min_new_size = Universe::new_size(); // in bytes
size_t min_old_size = Universe::old_size(); // in bytes
calculate_verify_data(_verify_klass_data,
(HeapWord*)((uintptr_t)_new_gen->low_boundary + min_new_size + min_old_size),
_perm_gen->high_boundary);
*/
// Why doesn't the above just say that klass's always live in the perm
// gen? I'll see if that seems to work...
default:
// ???: What if a CollectedHeap doesn't have a permanent generation?
break;
case CollectedHeap::GenCollectedHeap:
case CollectedHeap::G1CollectedHeap: {
break;
}
#ifndef SERIALGC
case CollectedHeap::ParallelScavengeHeap: {
break;
}
#endif // SERIALGC
}
return _verify_klass_data[0];
}
return _verify_klass_data[1];
}
return markOopDesc::lock_mask_in_place;
}
return bits;
}
#endif // PRODUCT
void Universe::compute_verify_oop_data() {
}
if (!UseSharedSpaces) {
_klass = k;
}
#ifndef PRODUCT
else {
// sharing initilization should have already set up _klass
}
#endif
_method_idnum = m->method_idnum();
}
if (_prev_methods != NULL) {
if (method_ref != NULL) {
}
}
delete _prev_methods;
}
}
"only VMThread can add previous versions");
if (_prev_methods == NULL) {
// This is the first previous version so make some space.
// Start with 2 elements under the assumption that the class
// won't be redefined much.
}
// RC_TRACE macro has an embedded ResourceMark
RC_TRACE(0x00000100,
("add: %s(%s): adding prev version ref for cached method @%d",
_prev_methods->length()));
// Using weak references allows previous versions of the cached
// method to be GC'ed when they are no longer needed. Since the
// caller is the VMThread and we are at a safepoint, this is a good
// time to clear out unused weak references.
if (method_ref == NULL) {
_prev_methods->remove_at(i);
// Since we are traversing the array backwards, we don't have to
// do anything special with the index.
continue; // robustness
}
if (m == NULL) {
// this method entry has been GC'ed so remove it
_prev_methods->remove_at(i);
} else {
// RC_TRACE macro has an embedded ResourceMark
}
}
} // end add_previous_version()
if (check_method == method) {
// done with the easy case
return true;
}
if (_prev_methods != NULL) {
// The cached method has been redefined at least once so search
// the previous versions for a match.
for (int i = 0; i < _prev_methods->length(); i++) {
if (method_ref == NULL) {
continue; // robustness
}
if (check_method == method) {
// a previous version matches
return true;
}
}
}
// either no previous versions or no previous version matched
return false;
}
return m;
}
#ifdef ASSERT
// Release dummy object(s) at bottom of heap
bool Universe::release_fullgc_alot_dummy() {
if (_fullgc_alot_dummy_array != NULL) {
// No more dummies to release, release entire array instead
return false;
}
if (!UseConcMarkSweepGC) {
// Release dummy at bottom of old generation
}
// Release dummy at bottom of permanent generation
}
return true;
}
#endif // ASSERT