< prev index next >

src/share/vm/gc_implementation/g1/g1ParScanThreadState.inline.hpp

Print this page
rev 8069 : imported patch g1_cleanup


  46       forwardee = (oop) m->decode_pointer();
  47     } else {
  48       forwardee = copy_to_survivor_space(in_cset_state, obj, m);
  49     }
  50     oopDesc::encode_store_heap_oop(p, forwardee);
  51   } else if (in_cset_state.is_humongous()) {
  52     _g1h->set_humongous_is_live(obj);
  53   } else {
  54     assert(!in_cset_state.is_in_cset_or_humongous(),
  55            err_msg("In_cset_state must be NotInCSet here, but is " CSETSTATE_FORMAT, in_cset_state.value()));
  56   }
  57 
  58   assert(obj != NULL, "Must be");
  59   update_rs(from, p, queue_num());
  60 }
  61 
  62 inline void G1ParScanThreadState::do_oop_partial_array(oop* p) {
  63   assert(has_partial_array_mask(p), "invariant");
  64   oop from_obj = clear_partial_array_mask(p);
  65 
  66   assert(Universe::heap()->is_in_reserved(from_obj), "must be in heap.");
  67   assert(from_obj->is_objArray(), "must be obj array");
  68   objArrayOop from_obj_array = objArrayOop(from_obj);
  69   // The from-space object contains the real length.
  70   int length                 = from_obj_array->length();
  71 
  72   assert(from_obj->is_forwarded(), "must be forwarded");
  73   oop to_obj                 = from_obj->forwardee();
  74   assert(from_obj != to_obj, "should not be chunking self-forwarded objects");
  75   objArrayOop to_obj_array   = objArrayOop(to_obj);
  76   // We keep track of the next start index in the length field of the
  77   // to-space object.
  78   int next_index             = to_obj_array->length();
  79   assert(0 <= next_index && next_index < length,
  80          err_msg("invariant, next index: %d, length: %d", next_index, length));
  81 
  82   int start                  = next_index;
  83   int end                    = length;
  84   int remainder              = end - start;
  85   // We'll try not to push a range that's smaller than ParGCArrayScanChunk.
  86   if (remainder > 2 * ParGCArrayScanChunk) {




  46       forwardee = (oop) m->decode_pointer();
  47     } else {
  48       forwardee = copy_to_survivor_space(in_cset_state, obj, m);
  49     }
  50     oopDesc::encode_store_heap_oop(p, forwardee);
  51   } else if (in_cset_state.is_humongous()) {
  52     _g1h->set_humongous_is_live(obj);
  53   } else {
  54     assert(!in_cset_state.is_in_cset_or_humongous(),
  55            err_msg("In_cset_state must be NotInCSet here, but is " CSETSTATE_FORMAT, in_cset_state.value()));
  56   }
  57 
  58   assert(obj != NULL, "Must be");
  59   update_rs(from, p, queue_num());
  60 }
  61 
  62 inline void G1ParScanThreadState::do_oop_partial_array(oop* p) {
  63   assert(has_partial_array_mask(p), "invariant");
  64   oop from_obj = clear_partial_array_mask(p);
  65 
  66   assert(_g1h->is_in_reserved(from_obj), "must be in heap.");
  67   assert(from_obj->is_objArray(), "must be obj array");
  68   objArrayOop from_obj_array = objArrayOop(from_obj);
  69   // The from-space object contains the real length.
  70   int length                 = from_obj_array->length();
  71 
  72   assert(from_obj->is_forwarded(), "must be forwarded");
  73   oop to_obj                 = from_obj->forwardee();
  74   assert(from_obj != to_obj, "should not be chunking self-forwarded objects");
  75   objArrayOop to_obj_array   = objArrayOop(to_obj);
  76   // We keep track of the next start index in the length field of the
  77   // to-space object.
  78   int next_index             = to_obj_array->length();
  79   assert(0 <= next_index && next_index < length,
  80          err_msg("invariant, next index: %d, length: %d", next_index, length));
  81 
  82   int start                  = next_index;
  83   int end                    = length;
  84   int remainder              = end - start;
  85   // We'll try not to push a range that's smaller than ParGCArrayScanChunk.
  86   if (remainder > 2 * ParGCArrayScanChunk) {


< prev index next >