< prev index next >

src/share/vm/memory/referenceProcessor.hpp

Print this page
rev 10551 : [backport] Remove safe_equals()


 180       if (!oopDesc::is_null(*(narrowOop*)_prev_next)) {
 181         _keep_alive->do_oop((narrowOop*)_prev_next);
 182       }
 183     } else {
 184       if (!oopDesc::is_null(*(oop*)_prev_next)) {
 185         _keep_alive->do_oop((oop*)_prev_next);
 186       }
 187     }
 188   }
 189 
 190   // NULL out referent pointer.
 191   void clear_referent();
 192 
 193   // Statistics
 194   NOT_PRODUCT(
 195   inline size_t processed() const { return _processed; }
 196   inline size_t removed() const   { return _removed; }
 197   )
 198 
 199   inline void move_to_next() {
 200     if (oopDesc::safe_equals(_ref, _next)) {
 201       // End of the list.
 202       _ref = NULL;
 203     } else {
 204       _ref = _next;
 205     }
 206     assert(! oopDesc::safe_equals(_ref, _first_seen), "cyclic ref_list found");
 207     NOT_PRODUCT(_processed++);
 208   }
 209 };
 210 
 211 class ReferenceProcessor : public CHeapObj<mtGC> {
 212 
 213  public:
 214   size_t total_count(DiscoveredList lists[]);
 215 
 216  protected:
 217   // Compatibility with pre-4965777 JDK's
 218   static bool _pending_list_uses_discovered_field;
 219 
 220   // The SoftReference master timestamp clock
 221   static jlong _soft_ref_timestamp_clock;
 222 
 223   MemRegion   _span;                    // (right-open) interval of heap
 224                                         // subject to wkref discovery
 225 
 226   bool        _discovering_refs;        // true when discovery enabled




 180       if (!oopDesc::is_null(*(narrowOop*)_prev_next)) {
 181         _keep_alive->do_oop((narrowOop*)_prev_next);
 182       }
 183     } else {
 184       if (!oopDesc::is_null(*(oop*)_prev_next)) {
 185         _keep_alive->do_oop((oop*)_prev_next);
 186       }
 187     }
 188   }
 189 
 190   // NULL out referent pointer.
 191   void clear_referent();
 192 
 193   // Statistics
 194   NOT_PRODUCT(
 195   inline size_t processed() const { return _processed; }
 196   inline size_t removed() const   { return _removed; }
 197   )
 198 
 199   inline void move_to_next() {
 200     if (oopDesc::unsafe_equals(_ref, _next)) {
 201       // End of the list.
 202       _ref = NULL;
 203     } else {
 204       _ref = _next;
 205     }
 206     assert(! oopDesc::unsafe_equals(_ref, _first_seen), "cyclic ref_list found");
 207     NOT_PRODUCT(_processed++);
 208   }
 209 };
 210 
 211 class ReferenceProcessor : public CHeapObj<mtGC> {
 212 
 213  public:
 214   size_t total_count(DiscoveredList lists[]);
 215 
 216  protected:
 217   // Compatibility with pre-4965777 JDK's
 218   static bool _pending_list_uses_discovered_field;
 219 
 220   // The SoftReference master timestamp clock
 221   static jlong _soft_ref_timestamp_clock;
 222 
 223   MemRegion   _span;                    // (right-open) interval of heap
 224                                         // subject to wkref discovery
 225 
 226   bool        _discovering_refs;        // true when discovery enabled


< prev index next >