498
499 {
500 const uint young_index = from_region->young_index_in_cset();
501 assert((from_region->is_young() && young_index > 0) ||
502 (!from_region->is_young() && young_index == 0), "invariant" );
503 _surviving_young_words[young_index] += word_sz;
504 }
505
506 if (dest_attr.is_young()) {
507 if (age < markWord::max_age) {
508 age++;
509 obj->incr_age();
510 }
511 _age_table.add(age, word_sz);
512 } else {
513 update_bot_after_copying(obj, word_sz);
514 }
515
516 // Most objects are not arrays, so do one array check rather than
517 // checking for each array category for each object.
518 if (klass->is_array_klass()) {
519 if (klass->is_objArray_klass()) {
520 start_partial_objarray(dest_attr, old, obj);
521 } else {
522 // Nothing needs to be done for typeArrays. Body doesn't contain
523 // any oops to scan, and the type in the klass will already be handled
524 // by processing the built-in module.
525 assert(klass->is_typeArray_klass(), "invariant");
526 }
527 return obj;
528 }
529
530 ContinuationGCSupport::transform_stack_chunk(obj);
531
532 // Check for deduplicating young Strings.
533 if (G1StringDedup::is_candidate_from_evacuation(klass,
534 region_attr,
535 dest_attr,
536 age)) {
537 // Record old; request adds a new weak reference, which reference
538 // processing expects to refer to a from-space object.
|
498
499 {
500 const uint young_index = from_region->young_index_in_cset();
501 assert((from_region->is_young() && young_index > 0) ||
502 (!from_region->is_young() && young_index == 0), "invariant" );
503 _surviving_young_words[young_index] += word_sz;
504 }
505
506 if (dest_attr.is_young()) {
507 if (age < markWord::max_age) {
508 age++;
509 obj->incr_age();
510 }
511 _age_table.add(age, word_sz);
512 } else {
513 update_bot_after_copying(obj, word_sz);
514 }
515
516 // Most objects are not arrays, so do one array check rather than
517 // checking for each array category for each object.
518 // CMH: Valhalla flat arrays can split this work up, but for now, doesn't
519 if (klass->is_array_klass() && !klass->is_flatArray_klass()) {
520 if (klass->is_objArray_klass()) {
521 start_partial_objarray(dest_attr, old, obj);
522 } else {
523 // Nothing needs to be done for typeArrays. Body doesn't contain
524 // any oops to scan, and the type in the klass will already be handled
525 // by processing the built-in module.
526 assert(klass->is_typeArray_klass(), "invariant");
527 }
528 return obj;
529 }
530
531 ContinuationGCSupport::transform_stack_chunk(obj);
532
533 // Check for deduplicating young Strings.
534 if (G1StringDedup::is_candidate_from_evacuation(klass,
535 region_attr,
536 dest_attr,
537 age)) {
538 // Record old; request adds a new weak reference, which reference
539 // processing expects to refer to a from-space object.
|