< prev index next >

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

Print this page

497 
498     {
499       const uint young_index = from_region->young_index_in_cset();
500       assert((from_region->is_young() && young_index >  0) ||
501              (!from_region->is_young() && young_index == 0), "invariant" );
502       _surviving_young_words[young_index] += word_sz;
503     }
504 
505     if (dest_attr.is_young()) {
506       if (age < markWord::max_age) {
507         age++;
508         obj->incr_age();
509       }
510       _age_table.add(age, word_sz);
511     } else {
512       update_bot_after_copying(obj, word_sz);
513     }
514 
515     // Most objects are not arrays, so do one array check rather than
516     // checking for each array category for each object.
517     if (klass->is_array_klass()) {

518       if (klass->is_objArray_klass()) {
519         start_partial_objarray(dest_attr, old, obj);
520       } else {
521         // Nothing needs to be done for typeArrays.  Body doesn't contain
522         // any oops to scan, and the type in the klass will already be handled
523         // by processing the built-in module.
524         assert(klass->is_typeArray_klass(), "invariant");
525       }
526       return obj;
527     }
528 
529     // Check for deduplicating young Strings.
530     if (G1StringDedup::is_candidate_from_evacuation(klass,
531                                                     region_attr,
532                                                     dest_attr,
533                                                     age)) {
534       // Record old; request adds a new weak reference, which reference
535       // processing expects to refer to a from-space object.
536       _string_dedup_requests.add(old);
537     }

497 
498     {
499       const uint young_index = from_region->young_index_in_cset();
500       assert((from_region->is_young() && young_index >  0) ||
501              (!from_region->is_young() && young_index == 0), "invariant" );
502       _surviving_young_words[young_index] += word_sz;
503     }
504 
505     if (dest_attr.is_young()) {
506       if (age < markWord::max_age) {
507         age++;
508         obj->incr_age();
509       }
510       _age_table.add(age, word_sz);
511     } else {
512       update_bot_after_copying(obj, word_sz);
513     }
514 
515     // Most objects are not arrays, so do one array check rather than
516     // checking for each array category for each object.
517     // CMH: Valhalla flat arrays can split this work up, but for now, doesn't
518     if (klass->is_array_klass() && !klass->is_flatArray_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     // Check for deduplicating young Strings.
531     if (G1StringDedup::is_candidate_from_evacuation(klass,
532                                                     region_attr,
533                                                     dest_attr,
534                                                     age)) {
535       // Record old; request adds a new weak reference, which reference
536       // processing expects to refer to a from-space object.
537       _string_dedup_requests.add(old);
538     }
< prev index next >