< prev index next >

src/share/vm/oops/instanceRefKlass.inline.hpp

Print this page




  54       Devirtualizer<nv>::do_oop(closure, referent_addr);
  55     }
  56   }
  57   T* next_addr = (T*)java_lang_ref_Reference::next_addr(obj);
  58   T next_oop  = oopDesc::load_heap_oop(next_addr);
  59   // Treat discovered as normal oop, if ref is not "active" (next non-NULL)
  60   if (!oopDesc::is_null(next_oop) && contains(disc_addr)) {
  61     // i.e. ref is not "active"
  62     debug_only(
  63       if(TraceReferenceGC && PrintGCDetails) {
  64         gclog_or_tty->print_cr("   Process discovered as normal "
  65                                PTR_FORMAT, p2i(disc_addr));
  66       }
  67     )
  68     Devirtualizer<nv>::do_oop(closure, disc_addr);
  69   }
  70   // treat next as normal oop
  71   if (contains(next_addr)) {
  72     Devirtualizer<nv>::do_oop(closure, next_addr);
  73   }







  74 }
  75 
  76 class AlwaysContains {
  77  public:
  78   template <typename T> bool operator()(T* p) const { return true; }
  79 };
  80 
  81 template <bool nv, class OopClosureType>
  82 void InstanceRefKlass::oop_oop_iterate_ref_processing(oop obj, OopClosureType* closure) {
  83   AlwaysContains always_contains;
  84   if (UseCompressedOops) {
  85     oop_oop_iterate_ref_processing_specialized<nv, narrowOop>(obj, closure, always_contains);
  86   } else {
  87     oop_oop_iterate_ref_processing_specialized<nv, oop>(obj, closure, always_contains);
  88   }
  89 }
  90 
  91 class MrContains {
  92   const MemRegion _mr;
  93  public:




  54       Devirtualizer<nv>::do_oop(closure, referent_addr);
  55     }
  56   }
  57   T* next_addr = (T*)java_lang_ref_Reference::next_addr(obj);
  58   T next_oop  = oopDesc::load_heap_oop(next_addr);
  59   // Treat discovered as normal oop, if ref is not "active" (next non-NULL)
  60   if (!oopDesc::is_null(next_oop) && contains(disc_addr)) {
  61     // i.e. ref is not "active"
  62     debug_only(
  63       if(TraceReferenceGC && PrintGCDetails) {
  64         gclog_or_tty->print_cr("   Process discovered as normal "
  65                                PTR_FORMAT, p2i(disc_addr));
  66       }
  67     )
  68     Devirtualizer<nv>::do_oop(closure, disc_addr);
  69   }
  70   // treat next as normal oop
  71   if (contains(next_addr)) {
  72     Devirtualizer<nv>::do_oop(closure, next_addr);
  73   }
  74   // treat value as normal oop if Ephemeron
  75   if (reference_type() == REF_EPHEMERON) {
  76     T* value_addr = (T*)java_lang_ref_Ephemeron::value_addr(obj);
  77     if (contains(value_addr)) {
  78       Devirtualizer<nv>::do_oop(closure, value_addr);
  79     }
  80   }
  81 }
  82 
  83 class AlwaysContains {
  84  public:
  85   template <typename T> bool operator()(T* p) const { return true; }
  86 };
  87 
  88 template <bool nv, class OopClosureType>
  89 void InstanceRefKlass::oop_oop_iterate_ref_processing(oop obj, OopClosureType* closure) {
  90   AlwaysContains always_contains;
  91   if (UseCompressedOops) {
  92     oop_oop_iterate_ref_processing_specialized<nv, narrowOop>(obj, closure, always_contains);
  93   } else {
  94     oop_oop_iterate_ref_processing_specialized<nv, oop>(obj, closure, always_contains);
  95   }
  96 }
  97 
  98 class MrContains {
  99   const MemRegion _mr;
 100  public:


< prev index next >