hotspot/src/share/vm/runtime/java.cpp
changeset 20702 bbe0fcde6e13
parent 20053 a12bd7991794
child 21095 1a04f7b3946e
equal deleted inserted replaced
20701:ef9996662fd5 20702:bbe0fcde6e13
   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();
   194       m->print_codes();
   196       m->print_codes();
       
   197       total_size += m->method_data()->size_in_bytes();
   195     }
   198     }
   196     tty->print_cr("------------------------------------------------------------------------");
   199     tty->print_cr("------------------------------------------------------------------------");
       
   200     tty->print_cr("Total MDO size: %d bytes", total_size);
   197   }
   201   }
   198 }
   202 }
   199 
   203 
   200 void print_bytecode_count() {
   204 void print_bytecode_count() {
   201   if (CountBytecodes || TraceBytecodes || StopInterpreterAt) {
   205   if (CountBytecodes || TraceBytecodes || StopInterpreterAt) {