src/share/vm/gc_implementation/g1/concurrentMark.cpp

changeset 5122
05a17f270c7e
parent 5018
b06ac540229e
child 5237
f2110083203d
     1.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Wed May 15 22:35:36 2013 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Thu May 16 13:02:33 2013 +0200
     1.3 @@ -4515,7 +4515,8 @@
     1.4      _total_used_bytes(0), _total_capacity_bytes(0),
     1.5      _total_prev_live_bytes(0), _total_next_live_bytes(0),
     1.6      _hum_used_bytes(0), _hum_capacity_bytes(0),
     1.7 -    _hum_prev_live_bytes(0), _hum_next_live_bytes(0) {
     1.8 +    _hum_prev_live_bytes(0), _hum_next_live_bytes(0),
     1.9 +    _total_remset_bytes(0) {
    1.10    G1CollectedHeap* g1h = G1CollectedHeap::heap();
    1.11    MemRegion g1_committed = g1h->g1_committed();
    1.12    MemRegion g1_reserved = g1h->g1_reserved();
    1.13 @@ -4533,23 +4534,25 @@
    1.14                   HeapRegion::GrainBytes);
    1.15    _out->print_cr(G1PPRL_LINE_PREFIX);
    1.16    _out->print_cr(G1PPRL_LINE_PREFIX
    1.17 -                 G1PPRL_TYPE_H_FORMAT
    1.18 -                 G1PPRL_ADDR_BASE_H_FORMAT
    1.19 -                 G1PPRL_BYTE_H_FORMAT
    1.20 -                 G1PPRL_BYTE_H_FORMAT
    1.21 -                 G1PPRL_BYTE_H_FORMAT
    1.22 -                 G1PPRL_DOUBLE_H_FORMAT,
    1.23 -                 "type", "address-range",
    1.24 -                 "used", "prev-live", "next-live", "gc-eff");
    1.25 +                G1PPRL_TYPE_H_FORMAT
    1.26 +                G1PPRL_ADDR_BASE_H_FORMAT
    1.27 +                G1PPRL_BYTE_H_FORMAT
    1.28 +                G1PPRL_BYTE_H_FORMAT
    1.29 +                G1PPRL_BYTE_H_FORMAT
    1.30 +                G1PPRL_DOUBLE_H_FORMAT
    1.31 +                G1PPRL_BYTE_H_FORMAT,
    1.32 +                "type", "address-range",
    1.33 +                "used", "prev-live", "next-live", "gc-eff", "remset");
    1.34    _out->print_cr(G1PPRL_LINE_PREFIX
    1.35 -                 G1PPRL_TYPE_H_FORMAT
    1.36 -                 G1PPRL_ADDR_BASE_H_FORMAT
    1.37 -                 G1PPRL_BYTE_H_FORMAT
    1.38 -                 G1PPRL_BYTE_H_FORMAT
    1.39 -                 G1PPRL_BYTE_H_FORMAT
    1.40 -                 G1PPRL_DOUBLE_H_FORMAT,
    1.41 -                 "", "",
    1.42 -                 "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)");
    1.43 +                G1PPRL_TYPE_H_FORMAT
    1.44 +                G1PPRL_ADDR_BASE_H_FORMAT
    1.45 +                G1PPRL_BYTE_H_FORMAT
    1.46 +                G1PPRL_BYTE_H_FORMAT
    1.47 +                G1PPRL_BYTE_H_FORMAT
    1.48 +                G1PPRL_DOUBLE_H_FORMAT
    1.49 +                G1PPRL_BYTE_H_FORMAT,
    1.50 +                "", "",
    1.51 +                "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)", "(bytes)");
    1.52  }
    1.53  
    1.54  // It takes as a parameter a reference to one of the _hum_* fields, it
    1.55 @@ -4591,6 +4594,7 @@
    1.56    size_t prev_live_bytes = r->live_bytes();
    1.57    size_t next_live_bytes = r->next_live_bytes();
    1.58    double gc_eff          = r->gc_efficiency();
    1.59 +  size_t remset_bytes    = r->rem_set()->mem_size();
    1.60    if (r->used() == 0) {
    1.61      type = "FREE";
    1.62    } else if (r->is_survivor()) {
    1.63 @@ -4624,6 +4628,7 @@
    1.64    _total_capacity_bytes  += capacity_bytes;
    1.65    _total_prev_live_bytes += prev_live_bytes;
    1.66    _total_next_live_bytes += next_live_bytes;
    1.67 +  _total_remset_bytes    += remset_bytes;
    1.68  
    1.69    // Print a line for this particular region.
    1.70    _out->print_cr(G1PPRL_LINE_PREFIX
    1.71 @@ -4632,14 +4637,17 @@
    1.72                   G1PPRL_BYTE_FORMAT
    1.73                   G1PPRL_BYTE_FORMAT
    1.74                   G1PPRL_BYTE_FORMAT
    1.75 -                 G1PPRL_DOUBLE_FORMAT,
    1.76 +                 G1PPRL_DOUBLE_FORMAT
    1.77 +                 G1PPRL_BYTE_FORMAT,
    1.78                   type, bottom, end,
    1.79 -                 used_bytes, prev_live_bytes, next_live_bytes, gc_eff);
    1.80 +                 used_bytes, prev_live_bytes, next_live_bytes, gc_eff , remset_bytes);
    1.81  
    1.82    return false;
    1.83  }
    1.84  
    1.85  G1PrintRegionLivenessInfoClosure::~G1PrintRegionLivenessInfoClosure() {
    1.86 +  // add static memory usages to remembered set sizes
    1.87 +  _total_remset_bytes += HeapRegionRemSet::fl_mem_size() + HeapRegionRemSet::static_mem_size();
    1.88    // Print the footer of the output.
    1.89    _out->print_cr(G1PPRL_LINE_PREFIX);
    1.90    _out->print_cr(G1PPRL_LINE_PREFIX
    1.91 @@ -4647,13 +4655,15 @@
    1.92                   G1PPRL_SUM_MB_FORMAT("capacity")
    1.93                   G1PPRL_SUM_MB_PERC_FORMAT("used")
    1.94                   G1PPRL_SUM_MB_PERC_FORMAT("prev-live")
    1.95 -                 G1PPRL_SUM_MB_PERC_FORMAT("next-live"),
    1.96 +                 G1PPRL_SUM_MB_PERC_FORMAT("next-live")
    1.97 +                 G1PPRL_SUM_MB_FORMAT("remset"),
    1.98                   bytes_to_mb(_total_capacity_bytes),
    1.99                   bytes_to_mb(_total_used_bytes),
   1.100                   perc(_total_used_bytes, _total_capacity_bytes),
   1.101                   bytes_to_mb(_total_prev_live_bytes),
   1.102                   perc(_total_prev_live_bytes, _total_capacity_bytes),
   1.103                   bytes_to_mb(_total_next_live_bytes),
   1.104 -                 perc(_total_next_live_bytes, _total_capacity_bytes));
   1.105 +                 perc(_total_next_live_bytes, _total_capacity_bytes),
   1.106 +                 bytes_to_mb(_total_remset_bytes));
   1.107    _out->cr();
   1.108  }

mercurial