--- a/hotspot/src/share/vm/oops/instanceKlass.cpp Tue Jun 24 15:50:50 2014 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Tue Jun 24 16:20:15 2014 +0200
@@ -35,6 +35,7 @@
#include "jvmtifiles/jvmti.h"
#include "memory/genOopClosures.inline.hpp"
#include "memory/heapInspection.hpp"
+#include "memory/iterator.inline.hpp"
#include "memory/metadataFactory.hpp"
#include "memory/oopFactory.hpp"
#include "oops/fieldStreams.hpp"
@@ -2114,12 +2115,6 @@
// closure's do_metadata() method dictates whether the given closure should be
// applied to the klass ptr in the object header.
-#define if_do_metadata_checked(closure, nv_suffix) \
- /* Make sure the non-virtual and the virtual versions match. */ \
- assert(closure->do_metadata##nv_suffix() == closure->do_metadata(), \
- "Inconsistency in do_metadata"); \
- if (closure->do_metadata##nv_suffix())
-
#define InstanceKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
\
int InstanceKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) { \
@@ -2143,10 +2138,9 @@
int InstanceKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, \
OopClosureType* closure) { \
SpecializationStats::record_iterate_call##nv_suffix(SpecializationStats::ik); \
- /* header */ \
- if_do_metadata_checked(closure, nv_suffix) { \
- closure->do_klass##nv_suffix(obj->klass()); \
- } \
+ \
+ assert_should_ignore_metadata(closure, nv_suffix); \
+ \
/* instance variables */ \
InstanceKlass_OOP_MAP_REVERSE_ITERATE( \
obj, \