< prev index next >

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

Print this page

480   const oop forward_ptr = old->forward_to_atomic(obj, old_mark, memory_order_relaxed);
481   if (forward_ptr == NULL) {
482 
483     {
484       const uint young_index = from_region->young_index_in_cset();
485       assert((from_region->is_young() && young_index >  0) ||
486              (!from_region->is_young() && young_index == 0), "invariant" );
487       _surviving_young_words[young_index] += word_sz;
488     }
489 
490     if (dest_attr.is_young()) {
491       if (age < markWord::max_age) {
492         age++;
493         obj->incr_age();
494       }
495       _age_table.add(age, word_sz);
496     }
497 
498     // Most objects are not arrays, so do one array check rather than
499     // checking for each array category for each object.
500     if (klass->is_array_klass()) {

501       if (klass->is_objArray_klass()) {
502         start_partial_objarray(dest_attr, old, obj);
503       } else {
504         // Nothing needs to be done for typeArrays.  Body doesn't contain
505         // any oops to scan, and the type in the klass will already be handled
506         // by processing the built-in module.
507         assert(klass->is_typeArray_klass(), "invariant");
508       }
509       return obj;
510     }
511 
512     // Check for deduplicating young Strings.
513     if (G1StringDedup::is_candidate_from_evacuation(klass,
514                                                     region_attr,
515                                                     dest_attr,
516                                                     age)) {
517       // Record old; request adds a new weak reference, which reference
518       // processing expects to refer to a from-space object.
519       _string_dedup_requests.add(old);
520     }

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