comparison src/share/vm/oops/klass.hpp @ 20198:c49dcaf78a65

8042737: Introduce umbrella header prefetch.inline.hpp Reviewed-by: twisti, stefank
author goetz
date Thu, 08 May 2014 15:37:17 +0200
parents ce8f6bb717c9
children 76b588255908
comparison
equal deleted inserted replaced
20197:ce8f6bb717c9 20198:c49dcaf78a65
582 // The is_alive closure passed in depends on the Garbage Collector used. 582 // The is_alive closure passed in depends on the Garbage Collector used.
583 bool is_loader_alive(BoolObjectClosure* is_alive); 583 bool is_loader_alive(BoolObjectClosure* is_alive);
584 584
585 static void clean_weak_klass_links(BoolObjectClosure* is_alive); 585 static void clean_weak_klass_links(BoolObjectClosure* is_alive);
586 586
587 // Prefetch within oop iterators. This is a macro because we
588 // can't guarantee that the compiler will inline it. In 64-bit
589 // it generally doesn't. Signature is
590 //
591 // static void prefetch_beyond(oop* const start,
592 // oop* const end,
593 // const intx foffset,
594 // const Prefetch::style pstyle);
595 #define prefetch_beyond(start, end, foffset, pstyle) { \
596 const intx foffset_ = (foffset); \
597 const Prefetch::style pstyle_ = (pstyle); \
598 assert(foffset_ > 0, "prefetch beyond, not behind"); \
599 if (pstyle_ != Prefetch::do_none) { \
600 oop* ref = (start); \
601 if (ref < (end)) { \
602 switch (pstyle_) { \
603 case Prefetch::do_read: \
604 Prefetch::read(*ref, foffset_); \
605 break; \
606 case Prefetch::do_write: \
607 Prefetch::write(*ref, foffset_); \
608 break; \
609 default: \
610 ShouldNotReachHere(); \
611 break; \
612 } \
613 } \
614 } \
615 }
616
617 // iterators 587 // iterators
618 virtual int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) = 0; 588 virtual int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) = 0;
619 virtual int oop_oop_iterate_v(oop obj, ExtendedOopClosure* blk) { 589 virtual int oop_oop_iterate_v(oop obj, ExtendedOopClosure* blk) {
620 return oop_oop_iterate(obj, blk); 590 return oop_oop_iterate(obj, blk);
621 } 591 }