60 (HeapWord*)_virtual_space.high_boundary());
61 }
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 _ref_processor = new SpanReferenceProcessor(_reserved); // a vanilla reference processor
81 if (_ref_processor == NULL) {
82 vm_exit_during_initialization("Could not allocate ReferenceProcessor object");
83 }
84 }
85
86 void Generation::print() const { print_on(tty); }
87
88 void Generation::print_on(outputStream* st) const {
89 st->print(" %-20s", name());
90 st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
91 capacity()/K, used()/K);
92 st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
93 p2i(_virtual_space.low_boundary()),
94 p2i(_virtual_space.high()),
95 p2i(_virtual_space.high_boundary()));
96 }
97
98 void Generation::print_summary_info_on(outputStream* st) {
99 StatRecord* sr = stat_record();
100 double time = sr->accumulated_time.seconds();
|
60 (HeapWord*)_virtual_space.high_boundary());
61 }
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_discoverer.set_span(_reserved);
81 _ref_processor = new ReferenceProcessor(&_span_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();
|