< prev index next >

src/hotspot/share/gc/g1/g1ParScanThreadState.cpp

Print this page

509 
510     {
511       const uint young_index = from_region->young_index_in_cset();
512       assert((from_region->is_young() && young_index >  0) ||
513              (!from_region->is_young() && young_index == 0), "invariant" );
514       _surviving_young_words[young_index] += word_sz;
515     }
516 
517     if (dest_attr.is_young()) {
518       if (age < markWord::max_age) {
519         age++;
520         obj->incr_age();
521       }
522       _age_table.add(age, word_sz);
523     } else {
524       update_bot_after_copying(obj, word_sz);
525     }
526 
527     // Most objects are not arrays, so do one array check rather than
528     // checking for each array category for each object.
529     if (klass->is_array_klass()) {

530       if (klass->is_objArray_klass()) {
531         start_partial_objarray(dest_attr, old, obj);
532       } else {
533         // Nothing needs to be done for typeArrays.  Body doesn't contain
534         // any oops to scan, and the type in the klass will already be handled
535         // by processing the built-in module.
536         assert(klass->is_typeArray_klass(), "invariant");
537       }
538       return obj;
539     }
540 
541     ContinuationGCSupport::transform_stack_chunk(obj);
542 
543     // Check for deduplicating young Strings.
544     if (G1StringDedup::is_candidate_from_evacuation(klass,
545                                                     region_attr,
546                                                     dest_attr,
547                                                     age)) {
548       // Record old; request adds a new weak reference, which reference
549       // processing expects to refer to a from-space object.

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