Merge

Mon, 18 Mar 2013 09:34:58 +0100

author
stefank
date
Mon, 18 Mar 2013 09:34:58 +0100
changeset 4786
19f9fabd94cc
parent 4749
7ae04e71af90
parent 4785
3c226052f7dc
child 4787
fa08949fe0cb

Merge

src/share/vm/memory/metaspace.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Fri Mar 15 11:44:33 2013 -0700
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Mon Mar 18 09:34:58 2013 +0100
     1.3 @@ -6068,6 +6068,10 @@
     1.4    verify_work_stacks_empty();
     1.5    verify_overflow_empty();
     1.6  
     1.7 +  if (should_unload_classes()) {
     1.8 +    ClassLoaderDataGraph::purge();
     1.9 +  }
    1.10 +
    1.11    _intra_sweep_timer.stop();
    1.12    _intra_sweep_estimate.sample(_intra_sweep_timer.seconds());
    1.13  
     2.1 --- a/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Fri Mar 15 11:44:33 2013 -0700
     2.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Mon Mar 18 09:34:58 2013 +0100
     2.3 @@ -656,7 +656,7 @@
     2.4      tty->print_cr("[Accumulated GC generation 0 time %3.7f secs]", time);
     2.5    }
     2.6    if (TraceGen1Time) {
     2.7 -    double time = PSMarkSweep::accumulated_time()->seconds();
     2.8 +    double time = UseParallelOldGC ? PSParallelCompact::accumulated_time()->seconds() : PSMarkSweep::accumulated_time()->seconds();
     2.9      tty->print_cr("[Accumulated GC generation 1 time %3.7f secs]", time);
    2.10    }
    2.11  }
     3.1 --- a/src/share/vm/memory/genCollectedHeap.cpp	Fri Mar 15 11:44:33 2013 -0700
     3.2 +++ b/src/share/vm/memory/genCollectedHeap.cpp	Mon Mar 18 09:34:58 2013 +0100
     3.3 @@ -554,6 +554,8 @@
     3.4      }
     3.5  
     3.6      if (complete) {
     3.7 +      // Delete metaspaces for unloaded class loaders and clean up loader_data graph
     3.8 +      ClassLoaderDataGraph::purge();
     3.9        // Resize the metaspace capacity after full collections
    3.10        MetaspaceGC::compute_new_size();
    3.11        update_full_collections_completed();
    3.12 @@ -564,11 +566,6 @@
    3.13  
    3.14      gc_epilogue(complete);
    3.15  
    3.16 -    // Delete metaspaces for unloaded class loaders and clean up loader_data graph
    3.17 -    if (complete) {
    3.18 -      ClassLoaderDataGraph::purge();
    3.19 -    }
    3.20 -
    3.21      if (must_restore_marks_for_biased_locking) {
    3.22        BiasedLocking::restore_marks();
    3.23      }
     4.1 --- a/src/share/vm/memory/metaspace.cpp	Fri Mar 15 11:44:33 2013 -0700
     4.2 +++ b/src/share/vm/memory/metaspace.cpp	Mon Mar 18 09:34:58 2013 +0100
     4.3 @@ -1308,8 +1308,7 @@
     4.4        gclog_or_tty->print_cr("  metaspace HWM: %.1fK", new_capacity_until_GC / (double) K);
     4.5      }
     4.6    }
     4.7 -  assert(vsl->used_bytes_sum() == used_after_gc &&
     4.8 -         used_after_gc <= vsl->capacity_bytes_sum(),
     4.9 +  assert(used_after_gc <= vsl->capacity_bytes_sum(),
    4.10           "sanity check");
    4.11  
    4.12  }
    4.13 @@ -1969,6 +1968,9 @@
    4.14  }
    4.15  
    4.16  SpaceManager::~SpaceManager() {
    4.17 +  // This call this->_lock which can't be done while holding expand_lock()
    4.18 +  const size_t in_use_before = sum_capacity_in_chunks_in_use();
    4.19 +
    4.20    MutexLockerEx fcl(SpaceManager::expand_lock(),
    4.21                      Mutex::_no_safepoint_check_flag);
    4.22  
    4.23 @@ -1986,7 +1988,7 @@
    4.24  
    4.25    // Have to update before the chunks_in_use lists are emptied
    4.26    // below.
    4.27 -  chunk_manager->inc_free_chunks_total(sum_capacity_in_chunks_in_use(),
    4.28 +  chunk_manager->inc_free_chunks_total(in_use_before,
    4.29                                         sum_count_in_chunks_in_use());
    4.30  
    4.31    // Add all the chunks in use by this space manager

mercurial