181 collected_profiled_methods = new GrowableArray<Method*>(1024); |
181 collected_profiled_methods = new GrowableArray<Method*>(1024); |
182 SystemDictionary::methods_do(collect_profiled_methods); |
182 SystemDictionary::methods_do(collect_profiled_methods); |
183 collected_profiled_methods->sort(&compare_methods); |
183 collected_profiled_methods->sort(&compare_methods); |
184 |
184 |
185 int count = collected_profiled_methods->length(); |
185 int count = collected_profiled_methods->length(); |
|
186 int total_size = 0; |
186 if (count > 0) { |
187 if (count > 0) { |
187 for (int index = 0; index < count; index++) { |
188 for (int index = 0; index < count; index++) { |
188 Method* m = collected_profiled_methods->at(index); |
189 Method* m = collected_profiled_methods->at(index); |
189 ttyLocker ttyl; |
190 ttyLocker ttyl; |
190 tty->print_cr("------------------------------------------------------------------------"); |
191 tty->print_cr("------------------------------------------------------------------------"); |
191 //m->print_name(tty); |
192 //m->print_name(tty); |
192 m->print_invocation_count(); |
193 m->print_invocation_count(); |
|
194 tty->print_cr(" mdo size: %d bytes", m->method_data()->size_in_bytes()); |
193 tty->cr(); |
195 tty->cr(); |
|
196 // Dump data on parameters if any |
|
197 if (m->method_data() != NULL && m->method_data()->parameters_type_data() != NULL) { |
|
198 tty->fill_to(2); |
|
199 m->method_data()->parameters_type_data()->print_data_on(tty); |
|
200 } |
194 m->print_codes(); |
201 m->print_codes(); |
|
202 total_size += m->method_data()->size_in_bytes(); |
195 } |
203 } |
196 tty->print_cr("------------------------------------------------------------------------"); |
204 tty->print_cr("------------------------------------------------------------------------"); |
|
205 tty->print_cr("Total MDO size: %d bytes", total_size); |
197 } |
206 } |
198 } |
207 } |
199 |
208 |
200 void print_bytecode_count() { |
209 void print_bytecode_count() { |
201 if (CountBytecodes || TraceBytecodes || StopInterpreterAt) { |
210 if (CountBytecodes || TraceBytecodes || StopInterpreterAt) { |
542 |
551 |
543 // Shutdown NMT before exit. Otherwise, |
552 // Shutdown NMT before exit. Otherwise, |
544 // it will run into trouble when system destroys static variables. |
553 // it will run into trouble when system destroys static variables. |
545 MemTracker::shutdown(MemTracker::NMT_normal); |
554 MemTracker::shutdown(MemTracker::NMT_normal); |
546 |
555 |
|
556 if (VerifyStringTableAtExit) { |
|
557 int fail_cnt = 0; |
|
558 { |
|
559 MutexLocker ml(StringTable_lock); |
|
560 fail_cnt = StringTable::verify_and_compare_entries(); |
|
561 } |
|
562 |
|
563 if (fail_cnt != 0) { |
|
564 tty->print_cr("ERROR: fail_cnt=%d", fail_cnt); |
|
565 guarantee(fail_cnt == 0, "unexpected StringTable verification failures"); |
|
566 } |
|
567 } |
|
568 |
547 #undef BEFORE_EXIT_NOT_RUN |
569 #undef BEFORE_EXIT_NOT_RUN |
548 #undef BEFORE_EXIT_RUNNING |
570 #undef BEFORE_EXIT_RUNNING |
549 #undef BEFORE_EXIT_DONE |
571 #undef BEFORE_EXIT_DONE |
550 } |
572 } |
551 |
573 |