src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp

changeset 2783
eda9eb483d29
parent 2651
92da084fefc9
child 2888
78542e2b5e35
     1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Thu Apr 07 16:52:15 2011 -0700
     1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Thu Apr 07 17:16:20 2011 -0700
     1.3 @@ -2104,11 +2104,7 @@
     1.4      // klasses are used in the update of an object?
     1.5      compact_perm(vmthread_cm);
     1.6  
     1.7 -    if (UseParallelOldGCCompacting) {
     1.8 -      compact();
     1.9 -    } else {
    1.10 -      compact_serial(vmthread_cm);
    1.11 -    }
    1.12 +    compact();
    1.13  
    1.14      // Reset the mark bitmap, summary data, and do other bookkeeping.  Must be
    1.15      // done before resizing.
    1.16 @@ -2582,18 +2578,16 @@
    1.17      // each thread?
    1.18      if (total_dense_prefix_regions > 0) {
    1.19        uint tasks_for_dense_prefix = 1;
    1.20 -      if (UseParallelDensePrefixUpdate) {
    1.21 -        if (total_dense_prefix_regions <=
    1.22 -            (parallel_gc_threads * PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING)) {
    1.23 -          // Don't over partition.  This assumes that
    1.24 -          // PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING is a small integer value
    1.25 -          // so there are not many regions to process.
    1.26 -          tasks_for_dense_prefix = parallel_gc_threads;
    1.27 -        } else {
    1.28 -          // Over partition
    1.29 -          tasks_for_dense_prefix = parallel_gc_threads *
    1.30 -            PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING;
    1.31 -        }
    1.32 +      if (total_dense_prefix_regions <=
    1.33 +          (parallel_gc_threads * PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING)) {
    1.34 +        // Don't over partition.  This assumes that
    1.35 +        // PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING is a small integer value
    1.36 +        // so there are not many regions to process.
    1.37 +        tasks_for_dense_prefix = parallel_gc_threads;
    1.38 +      } else {
    1.39 +        // Over partition
    1.40 +        tasks_for_dense_prefix = parallel_gc_threads *
    1.41 +          PAR_OLD_DENSE_PREFIX_OVER_PARTITIONING;
    1.42        }
    1.43        size_t regions_per_thread = total_dense_prefix_regions /
    1.44          tasks_for_dense_prefix;
    1.45 @@ -2733,21 +2727,6 @@
    1.46  }
    1.47  #endif  // #ifdef ASSERT
    1.48  
    1.49 -void PSParallelCompact::compact_serial(ParCompactionManager* cm) {
    1.50 -  EventMark m("5 compact serial");
    1.51 -  TraceTime tm("compact serial", print_phases(), true, gclog_or_tty);
    1.52 -
    1.53 -  ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
    1.54 -  assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
    1.55 -
    1.56 -  PSYoungGen* young_gen = heap->young_gen();
    1.57 -  PSOldGen* old_gen = heap->old_gen();
    1.58 -
    1.59 -  old_gen->start_array()->reset();
    1.60 -  old_gen->move_and_update(cm);
    1.61 -  young_gen->move_and_update(cm);
    1.62 -}
    1.63 -
    1.64  void
    1.65  PSParallelCompact::follow_weak_klass_links() {
    1.66    // All klasses on the revisit stack are marked at this point.
    1.67 @@ -3530,11 +3509,8 @@
    1.68             "Object liveness is wrong.");
    1.69      return ParMarkBitMap::incomplete;
    1.70    }
    1.71 -  assert(UseParallelOldGCDensePrefix ||
    1.72 -         (HeapMaximumCompactionInterval > 1) ||
    1.73 -         (MarkSweepAlwaysCompactCount > 1) ||
    1.74 -         (forwarding_ptr == new_pointer),
    1.75 -    "Calculation of new location is incorrect");
    1.76 +  assert(HeapMaximumCompactionInterval > 1 || MarkSweepAlwaysCompactCount > 1 ||
    1.77 +         forwarding_ptr == new_pointer, "new location is incorrect");
    1.78    return ParMarkBitMap::incomplete;
    1.79  }
    1.80  

mercurial