src/share/vm/runtime/java.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/java.cpp

Print this page
rev 5462 : 8026251: New type profiling points: parameters to methods
Summary: x86 interpreter and c1 type profiling for parameters on method entries
Reviewed-by:


 176 }
 177 
 178 void print_method_profiling_data() {
 179   ResourceMark rm;
 180   HandleMark hm;
 181   collected_profiled_methods = new GrowableArray<Method*>(1024);
 182   SystemDictionary::methods_do(collect_profiled_methods);
 183   collected_profiled_methods->sort(&compare_methods);
 184 
 185   int count = collected_profiled_methods->length();
 186   int total_size = 0;
 187   if (count > 0) {
 188     for (int index = 0; index < count; index++) {
 189       Method* m = collected_profiled_methods->at(index);
 190       ttyLocker ttyl;
 191       tty->print_cr("------------------------------------------------------------------------");
 192       //m->print_name(tty);
 193       m->print_invocation_count();
 194       tty->print_cr("  mdo size: %d bytes", m->method_data()->size_in_bytes());
 195       tty->cr();





 196       m->print_codes();
 197       total_size += m->method_data()->size_in_bytes();
 198     }
 199     tty->print_cr("------------------------------------------------------------------------");
 200     tty->print_cr("Total MDO size: %d bytes", total_size);
 201   }
 202 }
 203 
 204 void print_bytecode_count() {
 205   if (CountBytecodes || TraceBytecodes || StopInterpreterAt) {
 206     tty->print_cr("[BytecodeCounter::counter_value = %d]", BytecodeCounter::counter_value());
 207   }
 208 }
 209 
 210 AllocStats alloc_stats;
 211 
 212 
 213 
 214 // General statistics printing (profiling ...)
 215 




 176 }
 177 
 178 void print_method_profiling_data() {
 179   ResourceMark rm;
 180   HandleMark hm;
 181   collected_profiled_methods = new GrowableArray<Method*>(1024);
 182   SystemDictionary::methods_do(collect_profiled_methods);
 183   collected_profiled_methods->sort(&compare_methods);
 184 
 185   int count = collected_profiled_methods->length();
 186   int total_size = 0;
 187   if (count > 0) {
 188     for (int index = 0; index < count; index++) {
 189       Method* m = collected_profiled_methods->at(index);
 190       ttyLocker ttyl;
 191       tty->print_cr("------------------------------------------------------------------------");
 192       //m->print_name(tty);
 193       m->print_invocation_count();
 194       tty->print_cr("  mdo size: %d bytes", m->method_data()->size_in_bytes());
 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       }
 201       m->print_codes();
 202       total_size += m->method_data()->size_in_bytes();
 203     }
 204     tty->print_cr("------------------------------------------------------------------------");
 205     tty->print_cr("Total MDO size: %d bytes", total_size);
 206   }
 207 }
 208 
 209 void print_bytecode_count() {
 210   if (CountBytecodes || TraceBytecodes || StopInterpreterAt) {
 211     tty->print_cr("[BytecodeCounter::counter_value = %d]", BytecodeCounter::counter_value());
 212   }
 213 }
 214 
 215 AllocStats alloc_stats;
 216 
 217 
 218 
 219 // General statistics printing (profiling ...)
 220 


src/share/vm/runtime/java.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File