< prev index next >

src/hotspot/share/memory/iterator.inline.hpp

Print this page
*** 33,10 ***
--- 33,11 ---
  #include "oops/klass.hpp"
  #include "oops/instanceKlass.inline.hpp"
  #include "oops/instanceMirrorKlass.inline.hpp"
  #include "oops/instanceClassLoaderKlass.inline.hpp"
  #include "oops/instanceRefKlass.inline.hpp"
+ #include "oops/instanceStackChunkKlass.inline.hpp"
  #include "oops/objArrayKlass.inline.hpp"
  #include "oops/typeArrayKlass.inline.hpp"
  #include "utilities/debug.hpp"
  
  // Defaults to strong claiming.

*** 50,10 ***
--- 51,19 ---
  inline void ClaimMetadataVisitingOopIterateClosure::do_klass(Klass* k) {
    ClassLoaderData* cld = k->class_loader_data();
    ClaimMetadataVisitingOopIterateClosure::do_cld(cld);
  }
  
+ inline void ClaimMetadataVisitingOopIterateClosure::do_nmethod(nmethod* nm) {
+   nm->follow_nmethod(this);
+ }
+ 
+ inline void ClaimMetadataVisitingOopIterateClosure::do_method(Method* m) {
+   // Mark interpreted frames for marking_cycle
+   m->record_marking_cycle();
+ }
+ 
  // Implementation of the non-virtual do_oop dispatch.
  //
  // The same implementation is used for do_metadata, do_klass, and do_cld.
  //
  // Preconditions:

*** 167,10 ***
--- 177,46 ---
  template <typename OopClosureType>
  void Devirtualizer::do_cld(OopClosureType* closure, ClassLoaderData* cld) {
    call_do_cld(&OopClosureType::do_cld, &OopIterateClosure::do_cld, closure, cld);
  }
  
+ // Implementation of the non-virtual do_derived_oop dispatch.
+ 
+ template <typename Receiver, typename Base, typename DerivedOopClosureType>
+ static typename EnableIf<IsSame<Receiver, Base>::value, void>::type
+ call_do_derived_oop(void (Receiver::*)(oop*, derived_pointer*), void (Base::*)(oop*, derived_pointer*), DerivedOopClosureType* closure, oop* base, derived_pointer* derived) {
+   closure->do_derived_oop(base, derived);
+ }
+ 
+ template <typename Receiver, typename Base, typename DerivedOopClosureType>
+ static typename EnableIf<!IsSame<Receiver, Base>::value, void>::type
+ call_do_derived_oop(void (Receiver::*)(oop*, derived_pointer*), void (Base::*)(oop*, derived_pointer*), DerivedOopClosureType* closure, oop* base, derived_pointer* derived) {
+   closure->DerivedOopClosureType::do_derived_oop(base, derived);
+ }
+ 
+ template <typename DerivedOopClosureType>
+ inline void Devirtualizer::do_derived_oop(DerivedOopClosureType* closure, oop* base, derived_pointer* derived) {
+   call_do_derived_oop(&DerivedOopClosureType::do_derived_oop, &DerivedOopClosure::do_derived_oop, closure, base, derived);
+ }
+ 
+ template <typename Receiver, typename Base, typename BitMapClosureType>
+ static typename EnableIf<IsSame<Receiver, Base>::value, bool>::type
+ call_do_bit(bool (Receiver::*)(BitMap::idx_t), bool (Base::*)(BitMap::idx_t), BitMapClosureType* closure, BitMap::idx_t index) {
+   return closure->do_bit(index);
+ }
+ 
+ template <typename Receiver, typename Base, typename BitMapClosureType>
+ static typename EnableIf<!IsSame<Receiver, Base>::value, bool>::type
+ call_do_bit(bool (Receiver::*)(BitMap::idx_t), bool (Base::*)(BitMap::idx_t), BitMapClosureType* closure, BitMap::idx_t index) {
+   return closure->BitMapClosureType::do_bit(index);
+ }
+ 
+ template <typename BitMapClosureType>
+ inline bool Devirtualizer::do_bit(BitMapClosureType* closure, BitMap::idx_t index) {
+   return call_do_bit(&BitMapClosureType::do_bit, &BitMapClosure::do_bit, closure, index);
+ }
+ 
  // Dispatch table implementation for *Klass::oop_oop_iterate
  //
  // It allows for a single call to do a multi-dispatch to an optimized version
  //   of oop_oop_iterate that statically know all these types:
  //   - OopClosureType    : static type give at call site

*** 250,10 ***
--- 296,11 ---
      Table(){
        set_init_function<InstanceKlass>();
        set_init_function<InstanceRefKlass>();
        set_init_function<InstanceMirrorKlass>();
        set_init_function<InstanceClassLoaderKlass>();
+       set_init_function<InstanceStackChunkKlass>();
        set_init_function<ObjArrayKlass>();
        set_init_function<TypeArrayKlass>();
      }
    };
  

*** 312,10 ***
--- 359,11 ---
      Table(){
        set_init_function<InstanceKlass>();
        set_init_function<InstanceRefKlass>();
        set_init_function<InstanceMirrorKlass>();
        set_init_function<InstanceClassLoaderKlass>();
+       set_init_function<InstanceStackChunkKlass>();
        set_init_function<ObjArrayKlass>();
        set_init_function<TypeArrayKlass>();
      }
    };
  

*** 374,10 ***
--- 422,11 ---
      Table(){
        set_init_function<InstanceKlass>();
        set_init_function<InstanceRefKlass>();
        set_init_function<InstanceMirrorKlass>();
        set_init_function<InstanceClassLoaderKlass>();
+       set_init_function<InstanceStackChunkKlass>();
        set_init_function<ObjArrayKlass>();
        set_init_function<TypeArrayKlass>();
      }
    };
  
< prev index next >