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

Print this page




4536 G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name)
4537   : _out(out),
4538     _total_used_bytes(0), _total_capacity_bytes(0),
4539     _total_prev_live_bytes(0), _total_next_live_bytes(0),
4540     _hum_used_bytes(0), _hum_capacity_bytes(0),
4541     _hum_prev_live_bytes(0), _hum_next_live_bytes(0) {
4542   G1CollectedHeap* g1h = G1CollectedHeap::heap();
4543   MemRegion g1_committed = g1h->g1_committed();
4544   MemRegion g1_reserved = g1h->g1_reserved();
4545   double now = os::elapsedTime();
4546 
4547   // Print the header of the output.
4548   _out->cr();
4549   _out->print_cr(G1PPRL_LINE_PREFIX" PHASE %s @ %1.3f", phase_name, now);
4550   _out->print_cr(G1PPRL_LINE_PREFIX" HEAP"
4551                  G1PPRL_SUM_ADDR_FORMAT("committed")
4552                  G1PPRL_SUM_ADDR_FORMAT("reserved")
4553                  G1PPRL_SUM_BYTE_FORMAT("region-size"),
4554                  g1_committed.start(), g1_committed.end(),
4555                  g1_reserved.start(), g1_reserved.end(),
4556                  HeapRegion::GrainBytes);
4557   _out->print_cr(G1PPRL_LINE_PREFIX);
4558   _out->print_cr(G1PPRL_LINE_PREFIX
4559                  G1PPRL_TYPE_H_FORMAT
4560                  G1PPRL_ADDR_BASE_H_FORMAT
4561                  G1PPRL_BYTE_H_FORMAT
4562                  G1PPRL_BYTE_H_FORMAT
4563                  G1PPRL_BYTE_H_FORMAT
4564                  G1PPRL_DOUBLE_H_FORMAT,
4565                  "type", "address-range",
4566                  "used", "prev-live", "next-live", "gc-eff");
4567 }
4568 
4569 // It takes as a parameter a reference to one of the _hum_* fields, it
4570 // deduces the corresponding value for a region in a humongous region
4571 // series (either the region size, or what's left if the _hum_* field
4572 // is < the region size), and updates the _hum_* field accordingly.
4573 size_t G1PrintRegionLivenessInfoClosure::get_hum_bytes(size_t* hum_bytes) {
4574   size_t bytes = 0;
4575   // The > 0 check is to deal with the prev and next live bytes which
4576   // could be 0.




4536 G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name)
4537   : _out(out),
4538     _total_used_bytes(0), _total_capacity_bytes(0),
4539     _total_prev_live_bytes(0), _total_next_live_bytes(0),
4540     _hum_used_bytes(0), _hum_capacity_bytes(0),
4541     _hum_prev_live_bytes(0), _hum_next_live_bytes(0) {
4542   G1CollectedHeap* g1h = G1CollectedHeap::heap();
4543   MemRegion g1_committed = g1h->g1_committed();
4544   MemRegion g1_reserved = g1h->g1_reserved();
4545   double now = os::elapsedTime();
4546 
4547   // Print the header of the output.
4548   _out->cr();
4549   _out->print_cr(G1PPRL_LINE_PREFIX" PHASE %s @ %1.3f", phase_name, now);
4550   _out->print_cr(G1PPRL_LINE_PREFIX" HEAP"
4551                  G1PPRL_SUM_ADDR_FORMAT("committed")
4552                  G1PPRL_SUM_ADDR_FORMAT("reserved")
4553                  G1PPRL_SUM_BYTE_FORMAT("region-size"),
4554                  g1_committed.start(), g1_committed.end(),
4555                  g1_reserved.start(), g1_reserved.end(),
4556                  (size_t)HeapRegion::GrainBytes);
4557   _out->print_cr(G1PPRL_LINE_PREFIX);
4558   _out->print_cr(G1PPRL_LINE_PREFIX
4559                  G1PPRL_TYPE_H_FORMAT
4560                  G1PPRL_ADDR_BASE_H_FORMAT
4561                  G1PPRL_BYTE_H_FORMAT
4562                  G1PPRL_BYTE_H_FORMAT
4563                  G1PPRL_BYTE_H_FORMAT
4564                  G1PPRL_DOUBLE_H_FORMAT,
4565                  "type", "address-range",
4566                  "used", "prev-live", "next-live", "gc-eff");
4567 }
4568 
4569 // It takes as a parameter a reference to one of the _hum_* fields, it
4570 // deduces the corresponding value for a region in a humongous region
4571 // series (either the region size, or what's left if the _hum_* field
4572 // is < the region size), and updates the _hum_* field accordingly.
4573 size_t G1PrintRegionLivenessInfoClosure::get_hum_bytes(size_t* hum_bytes) {
4574   size_t bytes = 0;
4575   // The > 0 check is to deal with the prev and next live bytes which
4576   // could be 0.