66 67 size_t Generation::max_capacity() const { 68 return reserved().byte_size(); 69 } 70 71 void Generation::print_heap_change(size_t prev_used) const { 72 if (PrintGCDetails && Verbose) { 73 gclog_or_tty->print(" " SIZE_FORMAT 74 "->" SIZE_FORMAT 75 "(" SIZE_FORMAT ")", 76 prev_used, used(), capacity()); 77 } else { 78 gclog_or_tty->print(" " SIZE_FORMAT "K" 79 "->" SIZE_FORMAT "K" 80 "(" SIZE_FORMAT "K)", 81 prev_used / K, used() / K, capacity() / K); 82 } 83 } 84 85 // By default we get a single threaded default reference processor; 86 // generations needing multi-threaded refs discovery override this method. 87 void Generation::ref_processor_init() { 88 assert(_ref_processor == NULL, "a reference processor already exists"); 89 assert(!_reserved.is_empty(), "empty generation?"); 90 _ref_processor = 91 new ReferenceProcessor(_reserved, // span 92 refs_discovery_is_atomic(), // atomic_discovery 93 refs_discovery_is_mt()); // mt_discovery 94 if (_ref_processor == NULL) { 95 vm_exit_during_initialization("Could not allocate ReferenceProcessor object"); 96 } 97 } 98 99 void Generation::print() const { print_on(tty); } 100 101 void Generation::print_on(outputStream* st) const { 102 st->print(" %-20s", name()); 103 st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", 104 capacity()/K, used()/K); 105 st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")", 106 _virtual_space.low_boundary(), 107 _virtual_space.high(), 108 _virtual_space.high_boundary()); 109 } 110 111 void Generation::print_summary_info() { print_summary_info_on(tty); } 112 113 void Generation::print_summary_info_on(outputStream* st) { | 66 67 size_t Generation::max_capacity() const { 68 return reserved().byte_size(); 69 } 70 71 void Generation::print_heap_change(size_t prev_used) const { 72 if (PrintGCDetails && Verbose) { 73 gclog_or_tty->print(" " SIZE_FORMAT 74 "->" SIZE_FORMAT 75 "(" SIZE_FORMAT ")", 76 prev_used, used(), capacity()); 77 } else { 78 gclog_or_tty->print(" " SIZE_FORMAT "K" 79 "->" SIZE_FORMAT "K" 80 "(" SIZE_FORMAT "K)", 81 prev_used / K, used() / K, capacity() / K); 82 } 83 } 84 85 // By default we get a single threaded default reference processor; 86 // generations needing multi-threaded refs processing or discovery override this method. 87 void Generation::ref_processor_init() { 88 assert(_ref_processor == NULL, "a reference processor already exists"); 89 assert(!_reserved.is_empty(), "empty generation?"); 90 _ref_processor = new ReferenceProcessor(_reserved); // a vanilla reference processor 91 if (_ref_processor == NULL) { 92 vm_exit_during_initialization("Could not allocate ReferenceProcessor object"); 93 } 94 } 95 96 void Generation::print() const { print_on(tty); } 97 98 void Generation::print_on(outputStream* st) const { 99 st->print(" %-20s", name()); 100 st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", 101 capacity()/K, used()/K); 102 st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")", 103 _virtual_space.low_boundary(), 104 _virtual_space.high(), 105 _virtual_space.high_boundary()); 106 } 107 108 void Generation::print_summary_info() { print_summary_info_on(tty); } 109 110 void Generation::print_summary_info_on(outputStream* st) { |