< prev index next >

src/share/vm/gc/parallel/psParallelCompact.inline.hpp

Print this page




  71 
  72 inline HeapWord* PSParallelCompact::new_top(SpaceId id) {
  73   assert(id < last_space_id, "id out of range");
  74   return _space_info[id].new_top();
  75 }
  76 
  77 inline HeapWord* PSParallelCompact::dense_prefix(SpaceId id) {
  78   assert(id < last_space_id, "id out of range");
  79   return _space_info[id].dense_prefix();
  80 }
  81 
  82 inline ObjectStartArray* PSParallelCompact::start_array(SpaceId id) {
  83   assert(id < last_space_id, "id out of range");
  84   return _space_info[id].start_array();
  85 }
  86 
  87 #ifdef ASSERT
  88 inline void PSParallelCompact::check_new_location(HeapWord* old_addr, HeapWord* new_addr) {
  89   assert(old_addr >= new_addr || space_id(old_addr) != space_id(new_addr),
  90          "must move left or to a different space");
  91   assert(is_ptr_object_aligned(old_addr) && is_ptr_object_aligned(new_addr),
  92          "checking alignment");
  93 }
  94 #endif // ASSERT
  95 
  96 inline bool PSParallelCompact::mark_obj(oop obj) {
  97   const int obj_size = obj->size();
  98   if (mark_bitmap()->mark_obj(obj, obj_size)) {
  99     _summary_data.add_obj(obj, obj_size);
 100     return true;
 101   } else {
 102     return false;
 103   }
 104 }
 105 
 106 template <class T>
 107 inline void PSParallelCompact::adjust_pointer(T* p, ParCompactionManager* cm) {
 108   T heap_oop = oopDesc::load_heap_oop(p);
 109   if (!oopDesc::is_null(heap_oop)) {
 110     oop obj     = oopDesc::decode_heap_oop_not_null(heap_oop);
 111     assert(ParallelScavengeHeap::heap()->is_in(obj), "should be in heap");




  71 
  72 inline HeapWord* PSParallelCompact::new_top(SpaceId id) {
  73   assert(id < last_space_id, "id out of range");
  74   return _space_info[id].new_top();
  75 }
  76 
  77 inline HeapWord* PSParallelCompact::dense_prefix(SpaceId id) {
  78   assert(id < last_space_id, "id out of range");
  79   return _space_info[id].dense_prefix();
  80 }
  81 
  82 inline ObjectStartArray* PSParallelCompact::start_array(SpaceId id) {
  83   assert(id < last_space_id, "id out of range");
  84   return _space_info[id].start_array();
  85 }
  86 
  87 #ifdef ASSERT
  88 inline void PSParallelCompact::check_new_location(HeapWord* old_addr, HeapWord* new_addr) {
  89   assert(old_addr >= new_addr || space_id(old_addr) != space_id(new_addr),
  90          "must move left or to a different space");
  91   assert(is_object_aligned(old_addr) && is_object_aligned(new_addr),
  92          "checking alignment");
  93 }
  94 #endif // ASSERT
  95 
  96 inline bool PSParallelCompact::mark_obj(oop obj) {
  97   const int obj_size = obj->size();
  98   if (mark_bitmap()->mark_obj(obj, obj_size)) {
  99     _summary_data.add_obj(obj, obj_size);
 100     return true;
 101   } else {
 102     return false;
 103   }
 104 }
 105 
 106 template <class T>
 107 inline void PSParallelCompact::adjust_pointer(T* p, ParCompactionManager* cm) {
 108   T heap_oop = oopDesc::load_heap_oop(p);
 109   if (!oopDesc::is_null(heap_oop)) {
 110     oop obj     = oopDesc::decode_heap_oop_not_null(heap_oop);
 111     assert(ParallelScavengeHeap::heap()->is_in(obj), "should be in heap");


< prev index next >