< prev index next >

src/hotspot/share/gc/shared/generation.cpp

Print this page
rev 58017 : [mq]: 8238854-remove-superfluous-alloc-checks


  62 
  63 size_t Generation::initial_size() {
  64   GenCollectedHeap* gch = GenCollectedHeap::heap();
  65   if (gch->is_young_gen(this)) {
  66     return gch->young_gen_spec()->init_size();
  67   }
  68   return gch->old_gen_spec()->init_size();
  69 }
  70 
  71 size_t Generation::max_capacity() const {
  72   return reserved().byte_size();
  73 }
  74 
  75 // By default we get a single threaded default reference processor;
  76 // generations needing multi-threaded refs processing or discovery override this method.
  77 void Generation::ref_processor_init() {
  78   assert(_ref_processor == NULL, "a reference processor already exists");
  79   assert(!_reserved.is_empty(), "empty generation?");
  80   _span_based_discoverer.set_span(_reserved);
  81   _ref_processor = new ReferenceProcessor(&_span_based_discoverer);    // a vanilla reference processor
  82   if (_ref_processor == NULL) {
  83     vm_exit_during_initialization("Could not allocate ReferenceProcessor object");
  84   }
  85 }
  86 
  87 void Generation::print() const { print_on(tty); }
  88 
  89 void Generation::print_on(outputStream* st)  const {
  90   st->print(" %-20s", name());
  91   st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
  92              capacity()/K, used()/K);
  93   st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
  94               p2i(_virtual_space.low_boundary()),
  95               p2i(_virtual_space.high()),
  96               p2i(_virtual_space.high_boundary()));
  97 }
  98 
  99 void Generation::print_summary_info_on(outputStream* st) {
 100   StatRecord* sr = stat_record();
 101   double time = sr->accumulated_time.seconds();
 102   st->print_cr("Accumulated %s generation GC time %3.7f secs, "
 103                "%u GC's, avg GC time %3.7f",
 104                GenCollectedHeap::heap()->is_young_gen(this) ? "young" : "old" ,




  62 
  63 size_t Generation::initial_size() {
  64   GenCollectedHeap* gch = GenCollectedHeap::heap();
  65   if (gch->is_young_gen(this)) {
  66     return gch->young_gen_spec()->init_size();
  67   }
  68   return gch->old_gen_spec()->init_size();
  69 }
  70 
  71 size_t Generation::max_capacity() const {
  72   return reserved().byte_size();
  73 }
  74 
  75 // By default we get a single threaded default reference processor;
  76 // generations needing multi-threaded refs processing or discovery override this method.
  77 void Generation::ref_processor_init() {
  78   assert(_ref_processor == NULL, "a reference processor already exists");
  79   assert(!_reserved.is_empty(), "empty generation?");
  80   _span_based_discoverer.set_span(_reserved);
  81   _ref_processor = new ReferenceProcessor(&_span_based_discoverer);    // a vanilla reference processor



  82 }
  83 
  84 void Generation::print() const { print_on(tty); }
  85 
  86 void Generation::print_on(outputStream* st)  const {
  87   st->print(" %-20s", name());
  88   st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
  89              capacity()/K, used()/K);
  90   st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
  91               p2i(_virtual_space.low_boundary()),
  92               p2i(_virtual_space.high()),
  93               p2i(_virtual_space.high_boundary()));
  94 }
  95 
  96 void Generation::print_summary_info_on(outputStream* st) {
  97   StatRecord* sr = stat_record();
  98   double time = sr->accumulated_time.seconds();
  99   st->print_cr("Accumulated %s generation GC time %3.7f secs, "
 100                "%u GC's, avg GC time %3.7f",
 101                GenCollectedHeap::heap()->is_young_gen(this) ? "young" : "old" ,


< prev index next >