src/share/vm/services/g1MemoryPool.cpp

changeset 2109
e967bad2a9ab
parent 1907
c18cbe5936b8
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/services/g1MemoryPool.cpp	Mon Aug 23 17:51:10 2010 -0700
     1.2 +++ b/src/share/vm/services/g1MemoryPool.cpp	Wed Aug 25 08:44:58 2010 -0400
     1.3 @@ -28,12 +28,11 @@
     1.4  G1MemoryPoolSuper::G1MemoryPoolSuper(G1CollectedHeap* g1h,
     1.5                                       const char* name,
     1.6                                       size_t init_size,
     1.7 -                                     size_t max_size,
     1.8                                       bool support_usage_threshold) :
     1.9    _g1h(g1h), CollectedMemoryPool(name,
    1.10                                   MemoryPool::Heap,
    1.11                                   init_size,
    1.12 -                                 max_size,
    1.13 +                                 undefined_max(),
    1.14                                   support_usage_threshold) {
    1.15    assert(UseG1GC, "sanity");
    1.16  }
    1.17 @@ -53,13 +52,6 @@
    1.18  }
    1.19  
    1.20  // See the comment at the top of g1MemoryPool.hpp
    1.21 -size_t G1MemoryPoolSuper::eden_space_max(G1CollectedHeap* g1h) {
    1.22 -  // This should ensure that it returns a value no smaller than the
    1.23 -  // region size. Currently, eden_space_committed() guarantees that.
    1.24 -  return eden_space_committed(g1h);
    1.25 -}
    1.26 -
    1.27 -// See the comment at the top of g1MemoryPool.hpp
    1.28  size_t G1MemoryPoolSuper::survivor_space_committed(G1CollectedHeap* g1h) {
    1.29    return MAX2(survivor_space_used(g1h), (size_t) HeapRegion::GrainBytes);
    1.30  }
    1.31 @@ -72,13 +64,6 @@
    1.32  }
    1.33  
    1.34  // See the comment at the top of g1MemoryPool.hpp
    1.35 -size_t G1MemoryPoolSuper::survivor_space_max(G1CollectedHeap* g1h) {
    1.36 -  // This should ensure that it returns a value no smaller than the
    1.37 -  // region size. Currently, survivor_space_committed() guarantees that.
    1.38 -  return survivor_space_committed(g1h);
    1.39 -}
    1.40 -
    1.41 -// See the comment at the top of g1MemoryPool.hpp
    1.42  size_t G1MemoryPoolSuper::old_space_committed(G1CollectedHeap* g1h) {
    1.43    size_t committed = overall_committed(g1h);
    1.44    size_t eden_committed = eden_space_committed(g1h);
    1.45 @@ -99,24 +84,11 @@
    1.46    return used;
    1.47  }
    1.48  
    1.49 -// See the comment at the top of g1MemoryPool.hpp
    1.50 -size_t G1MemoryPoolSuper::old_space_max(G1CollectedHeap* g1h) {
    1.51 -  size_t max = overall_max(g1h);
    1.52 -  size_t eden_max = eden_space_max(g1h);
    1.53 -  size_t survivor_max = survivor_space_max(g1h);
    1.54 -  max = subtract_up_to_zero(max, eden_max);
    1.55 -  max = subtract_up_to_zero(max, survivor_max);
    1.56 -  max = MAX2(max, (size_t) HeapRegion::GrainBytes);
    1.57 -  return max;
    1.58 -}
    1.59 -
    1.60  G1EdenPool::G1EdenPool(G1CollectedHeap* g1h) :
    1.61    G1MemoryPoolSuper(g1h,
    1.62                      "G1 Eden",
    1.63                      eden_space_committed(g1h), /* init_size */
    1.64 -                    eden_space_max(g1h), /* max_size */
    1.65 -                    false /* support_usage_threshold */) {
    1.66 -}
    1.67 +                    false /* support_usage_threshold */) { }
    1.68  
    1.69  MemoryUsage G1EdenPool::get_memory_usage() {
    1.70    size_t initial_sz = initial_size();
    1.71 @@ -131,9 +103,7 @@
    1.72    G1MemoryPoolSuper(g1h,
    1.73                      "G1 Survivor",
    1.74                      survivor_space_committed(g1h), /* init_size */
    1.75 -                    survivor_space_max(g1h), /* max_size */
    1.76 -                    false /* support_usage_threshold */) {
    1.77 -}
    1.78 +                    false /* support_usage_threshold */) { }
    1.79  
    1.80  MemoryUsage G1SurvivorPool::get_memory_usage() {
    1.81    size_t initial_sz = initial_size();
    1.82 @@ -148,9 +118,7 @@
    1.83    G1MemoryPoolSuper(g1h,
    1.84                      "G1 Old Gen",
    1.85                      old_space_committed(g1h), /* init_size */
    1.86 -                    old_space_max(g1h), /* max_size */
    1.87 -                    true /* support_usage_threshold */) {
    1.88 -}
    1.89 +                    true /* support_usage_threshold */) { }
    1.90  
    1.91  MemoryUsage G1OldGenPool::get_memory_usage() {
    1.92    size_t initial_sz = initial_size();

mercurial