527
528 {
529 const uint young_index = from_region->young_index_in_cset();
530 assert((from_region->is_young() && young_index > 0) ||
531 (!from_region->is_young() && young_index == 0), "invariant" );
532 _surviving_young_words[young_index] += word_sz;
533 }
534
535 if (dest_attr.is_young()) {
536 if (age < markWord::max_age) {
537 age++;
538 obj->incr_age();
539 }
540 _age_table.add(age, word_sz);
541 } else {
542 update_bot_after_copying(obj, word_sz);
543 }
544
545 // Most objects are not arrays, so do one array check rather than
546 // checking for each array category for each object.
547 if (klass->is_array_klass()) {
548 if (klass->is_objArray_klass()) {
549 start_partial_objarray(dest_attr, old, obj);
550 } else {
551 // Nothing needs to be done for typeArrays. Body doesn't contain
552 // any oops to scan, and the type in the klass will already be handled
553 // by processing the built-in module.
554 assert(klass->is_typeArray_klass(), "invariant");
555 }
556 return obj;
557 }
558
559 ContinuationGCSupport::transform_stack_chunk(obj);
560
561 // Check for deduplicating young Strings.
562 if (G1StringDedup::is_candidate_from_evacuation(klass,
563 region_attr,
564 dest_attr,
565 age)) {
566 // Record old; request adds a new weak reference, which reference
567 // processing expects to refer to a from-space object.
|
527
528 {
529 const uint young_index = from_region->young_index_in_cset();
530 assert((from_region->is_young() && young_index > 0) ||
531 (!from_region->is_young() && young_index == 0), "invariant" );
532 _surviving_young_words[young_index] += word_sz;
533 }
534
535 if (dest_attr.is_young()) {
536 if (age < markWord::max_age) {
537 age++;
538 obj->incr_age();
539 }
540 _age_table.add(age, word_sz);
541 } else {
542 update_bot_after_copying(obj, word_sz);
543 }
544
545 // Most objects are not arrays, so do one array check rather than
546 // checking for each array category for each object.
547 // CMH: Valhalla flat arrays can split this work up, but for now, doesn't
548 if (klass->is_array_klass() && !klass->is_flatArray_klass()) {
549 if (klass->is_objArray_klass()) {
550 start_partial_objarray(dest_attr, old, obj);
551 } else {
552 // Nothing needs to be done for typeArrays. Body doesn't contain
553 // any oops to scan, and the type in the klass will already be handled
554 // by processing the built-in module.
555 assert(klass->is_typeArray_klass(), "invariant");
556 }
557 return obj;
558 }
559
560 ContinuationGCSupport::transform_stack_chunk(obj);
561
562 // Check for deduplicating young Strings.
563 if (G1StringDedup::is_candidate_from_evacuation(klass,
564 region_attr,
565 dest_attr,
566 age)) {
567 // Record old; request adds a new weak reference, which reference
568 // processing expects to refer to a from-space object.
|