hotspot/src/share/vm/oops/klass.hpp
changeset 24487 71ff0bd674eb
parent 24351 61b33cc6d3cf
child 25490 59f226da8d81
equal deleted inserted replaced
24486:0fd7d077f8a9 24487:71ff0bd674eb
   553   // The is_alive closure passed in depends on the Garbage Collector used.
   553   // The is_alive closure passed in depends on the Garbage Collector used.
   554   bool is_loader_alive(BoolObjectClosure* is_alive);
   554   bool is_loader_alive(BoolObjectClosure* is_alive);
   555 
   555 
   556   static void clean_weak_klass_links(BoolObjectClosure* is_alive);
   556   static void clean_weak_klass_links(BoolObjectClosure* is_alive);
   557 
   557 
   558   // Prefetch within oop iterators.  This is a macro because we
       
   559   // can't guarantee that the compiler will inline it.  In 64-bit
       
   560   // it generally doesn't.  Signature is
       
   561   //
       
   562   // static void prefetch_beyond(oop* const start,
       
   563   //                             oop* const end,
       
   564   //                             const intx foffset,
       
   565   //                             const Prefetch::style pstyle);
       
   566 #define prefetch_beyond(start, end, foffset, pstyle) {   \
       
   567     const intx foffset_ = (foffset);                     \
       
   568     const Prefetch::style pstyle_ = (pstyle);            \
       
   569     assert(foffset_ > 0, "prefetch beyond, not behind"); \
       
   570     if (pstyle_ != Prefetch::do_none) {                  \
       
   571       oop* ref = (start);                                \
       
   572       if (ref < (end)) {                                 \
       
   573         switch (pstyle_) {                               \
       
   574         case Prefetch::do_read:                          \
       
   575           Prefetch::read(*ref, foffset_);                \
       
   576           break;                                         \
       
   577         case Prefetch::do_write:                         \
       
   578           Prefetch::write(*ref, foffset_);               \
       
   579           break;                                         \
       
   580         default:                                         \
       
   581           ShouldNotReachHere();                          \
       
   582           break;                                         \
       
   583         }                                                \
       
   584       }                                                  \
       
   585     }                                                    \
       
   586   }
       
   587 
       
   588   // iterators
   558   // iterators
   589   virtual int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) = 0;
   559   virtual int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) = 0;
   590   virtual int oop_oop_iterate_v(oop obj, ExtendedOopClosure* blk) {
   560   virtual int oop_oop_iterate_v(oop obj, ExtendedOopClosure* blk) {
   591     return oop_oop_iterate(obj, blk);
   561     return oop_oop_iterate(obj, blk);
   592   }
   562   }