/*
* 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 "memory/genOopClosures.inline.hpp"
#include "memory/oopFactory.hpp"
#include "memory/permGen.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/instanceMirrorKlass.hpp"
#include "oops/instanceOop.hpp"
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
#include "runtime/handles.inline.hpp"
#ifndef SERIALGC
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
#include "gc_implementation/g1/g1RemSet.inline.hpp"
#include "gc_implementation/g1/heapRegionSeq.inline.hpp"
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
#include "oops/oop.pcgc.inline.hpp"
#endif
#ifdef ASSERT
template <class T> void assert_is_in(T *p) {
}
}
template <class T> void assert_is_in_closed_subset(T *p) {
}
}
template <class T> void assert_is_in_reserved(T *p) {
}
}
template <class T> void assert_nothing(T *p) {}
#else
template <class T> void assert_is_in(T *p) {}
template <class T> void assert_is_in_closed_subset(T *p) {}
template <class T> void assert_is_in_reserved(T *p) {}
template <class T> void assert_nothing(T *p) {}
#endif // ASSERT
#define InstanceMirrorKlass_SPECIALIZED_OOP_ITERATE( \
assert_fn) \
{ \
T* p = (T*)(start_p); \
while (p < end) { \
(assert_fn)(p); \
do_oop; \
++p; \
} \
}
{ \
T* const l = (T*)(low); \
T* const h = (T*)(high); \
"bounded region must be properly aligned"); \
T* p = (T*)(start_p); \
if (p < l) p = l; \
while (p < end) { \
(assert_fn)(p); \
do_oop; \
++p; \
} \
}
{ \
if (UseCompressedOops) { \
} else { \
} \
}
// The following macros call specialized macros, passing either oop or
// narrowOop as the specialization type. These test the UseCompressedOops
// flag.
{ \
if (UseCompressedOops) { \
} else { \
} \
}
MarkSweep::mark_and_push(p), \
}
#ifndef SERIALGC
}
#endif // SERIALGC
MarkSweep::adjust_pointer(p), \
return size;
}
// Macro to define instanceMirrorKlass::oop_oop_iterate for virtual/nonvirtual for
// all closures. Macros calling macros above for each oop size.
\
int instanceMirrorKlass:: \
/* Get size before changing pointers */ \
\
\
if (UseCompressedOops) { \
} else { \
} \
}
#ifndef SERIALGC
\
int instanceMirrorKlass:: \
/* Get size before changing pointers */ \
\
\
if (UseCompressedOops) { \
} else { \
} \
}
#endif // !SERIALGC
\
int instanceMirrorKlass:: \
\
if (UseCompressedOops) { \
} else { \
} \
}
#ifndef SERIALGC
#endif // SERIALGC
#ifndef SERIALGC
if (PSScavenge::should_scavenge(p)) { \
pm->claim_or_forward_depth(p); \
}, \
}
PSParallelCompact::adjust_pointer(p), \
}
#endif // SERIALGC
if (k() != NULL && k->oop_is_instance()) {
}
return size_helper();
}
// Query before forming handle.
return i;
}
}
}
return 0;
}