180 ResourceMark rm;
181 HandleMark hm;
182 collected_profiled_methods = new GrowableArray<Method*>(1024);
183 SystemDictionary::methods_do(collect_profiled_methods);
184 collected_profiled_methods->sort(&compare_methods);
185
186 int count = collected_profiled_methods->length();
187 int total_size = 0;
188 if (count > 0) {
189 for (int index = 0; index < count; index++) {
190 Method* m = collected_profiled_methods->at(index);
191 ttyLocker ttyl;
192 tty->print_cr("------------------------------------------------------------------------");
193 //m->print_name(tty);
194 m->print_invocation_count();
195 tty->print_cr(" mdo size: %d bytes", m->method_data()->size_in_bytes());
196 tty->cr();
197 // Dump data on parameters if any
198 if (m->method_data() != NULL && m->method_data()->parameters_type_data() != NULL) {
199 tty->fill_to(2);
200 m->method_data()->parameters_type_data()->print_data_on(tty);
201 }
202 m->print_codes();
203 total_size += m->method_data()->size_in_bytes();
204 }
205 tty->print_cr("------------------------------------------------------------------------");
206 tty->print_cr("Total MDO size: %d bytes", total_size);
207 }
208 }
209
210 void print_bytecode_count() {
211 if (CountBytecodes || TraceBytecodes || StopInterpreterAt) {
212 tty->print_cr("[BytecodeCounter::counter_value = %d]", BytecodeCounter::counter_value());
213 }
214 }
215
216 AllocStats alloc_stats;
217
218
219
220 // General statistics printing (profiling ...)
|
180 ResourceMark rm;
181 HandleMark hm;
182 collected_profiled_methods = new GrowableArray<Method*>(1024);
183 SystemDictionary::methods_do(collect_profiled_methods);
184 collected_profiled_methods->sort(&compare_methods);
185
186 int count = collected_profiled_methods->length();
187 int total_size = 0;
188 if (count > 0) {
189 for (int index = 0; index < count; index++) {
190 Method* m = collected_profiled_methods->at(index);
191 ttyLocker ttyl;
192 tty->print_cr("------------------------------------------------------------------------");
193 //m->print_name(tty);
194 m->print_invocation_count();
195 tty->print_cr(" mdo size: %d bytes", m->method_data()->size_in_bytes());
196 tty->cr();
197 // Dump data on parameters if any
198 if (m->method_data() != NULL && m->method_data()->parameters_type_data() != NULL) {
199 tty->fill_to(2);
200 m->method_data()->parameters_type_data()->print_data_on(tty, (const char*)NULL);
201 }
202 m->print_codes();
203 total_size += m->method_data()->size_in_bytes();
204 }
205 tty->print_cr("------------------------------------------------------------------------");
206 tty->print_cr("Total MDO size: %d bytes", total_size);
207 }
208 }
209
210 void print_bytecode_count() {
211 if (CountBytecodes || TraceBytecodes || StopInterpreterAt) {
212 tty->print_cr("[BytecodeCounter::counter_value = %d]", BytecodeCounter::counter_value());
213 }
214 }
215
216 AllocStats alloc_stats;
217
218
219
220 // General statistics printing (profiling ...)
|