Mercurial > hg > graal-compiler
diff src/share/vm/oops/instanceKlass.cpp @ 20268:4c1b88a53c74
8046670: Make CMS metadata aware closures applicable for other collectors
Reviewed-by: ehelin, mgerdin
author | stefank |
---|---|
date | Tue, 24 Jun 2014 16:20:15 +0200 |
parents | 27188ae8bbbb |
children | 2c6ef90f030a |
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.cpp Wed Mar 12 15:25:35 2014 +0100 +++ b/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" @@ -2132,12 +2133,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) { \ @@ -2161,10 +2156,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, \