166 tty->print_cr("\t%9d (%4.1f%%) interpreted", int_total, 100.0 * int_total / total);
167 tty->print_cr("\t%9d (%4.1f%%) compiled", comp_total, 100.0 * comp_total / total);
168 tty->print_cr("\t%9d (100%%) total", total);
169 tty->print_cr("\t%9d (%4.1f%%) synchronized", synch_total, 100.0 * synch_total / total);
170 tty->print_cr("\t%9d (%4.1f%%) final", final_total, 100.0 * final_total / total);
171 tty->print_cr("\t%9d (%4.1f%%) static", static_total, 100.0 * static_total / total);
172 tty->print_cr("\t%9d (%4.1f%%) native", nativ_total, 100.0 * nativ_total / total);
173 tty->print_cr("\t%9d (%4.1f%%) accessor", acces_total, 100.0 * acces_total / total);
174 tty->cr();
175 SharedRuntime::print_call_statistics(comp_total);
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 if (count > 0) {
187 for (int index = 0; index < count; index++) {
188 Method* m = collected_profiled_methods->at(index);
189 ttyLocker ttyl;
190 tty->print_cr("------------------------------------------------------------------------");
191 //m->print_name(tty);
192 m->print_invocation_count();
193 tty->cr();
194 m->print_codes();
195 }
196 tty->print_cr("------------------------------------------------------------------------");
197 }
198 }
199
200 void print_bytecode_count() {
201 if (CountBytecodes || TraceBytecodes || StopInterpreterAt) {
202 tty->print_cr("[BytecodeCounter::counter_value = %d]", BytecodeCounter::counter_value());
203 }
204 }
205
206 AllocStats alloc_stats;
207
208
209
210 // General statistics printing (profiling ...)
211
212 void print_statistics() {
213
214 #ifdef ASSERT
215
216 if (CountRuntimeCalls) {
|
166 tty->print_cr("\t%9d (%4.1f%%) interpreted", int_total, 100.0 * int_total / total);
167 tty->print_cr("\t%9d (%4.1f%%) compiled", comp_total, 100.0 * comp_total / total);
168 tty->print_cr("\t%9d (100%%) total", total);
169 tty->print_cr("\t%9d (%4.1f%%) synchronized", synch_total, 100.0 * synch_total / total);
170 tty->print_cr("\t%9d (%4.1f%%) final", final_total, 100.0 * final_total / total);
171 tty->print_cr("\t%9d (%4.1f%%) static", static_total, 100.0 * static_total / total);
172 tty->print_cr("\t%9d (%4.1f%%) native", nativ_total, 100.0 * nativ_total / total);
173 tty->print_cr("\t%9d (%4.1f%%) accessor", acces_total, 100.0 * acces_total / total);
174 tty->cr();
175 SharedRuntime::print_call_statistics(comp_total);
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
216 void print_statistics() {
217
218 #ifdef ASSERT
219
220 if (CountRuntimeCalls) {
|