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