< prev index next >

src/share/vm/utilities/xmlstream.cpp

Print this page




 363   stamp();
 364   end_elem();
 365   // Output the tail-tag of the enclosing element.
 366   buffer[kind_len] = 0;
 367   tail(buffer);
 368 }
 369 PRAGMA_DIAG_POP
 370 
 371 // Output a timestamp attribute.
 372 void xmlStream::stamp() {
 373   assert_if_no_error(inside_attrs(), "stamp must be an attribute");
 374   print_raw(" stamp='");
 375   out()->stamp();
 376   print_raw("'");
 377 }
 378 
 379 
 380 // ------------------------------------------------------------------
 381 // Output a method attribute, in the form " method='pkg/cls name sig'".
 382 // This is used only when there is no ciMethod available.
 383 void xmlStream::method(methodHandle method) {
 384   assert_if_no_error(inside_attrs(), "printing attributes");
 385   if (method.is_null())  return;
 386   print_raw(" method='");
 387   method_text(method);
 388   print("' bytes='%d'", method->code_size());
 389   print(" count='%d'", method->invocation_count());
 390   int bec = method->backedge_count();
 391   if (bec != 0)  print(" backedge_count='%d'", bec);
 392   print(" iicount='%d'", method->interpreter_invocation_count());
 393   int throwouts = method->interpreter_throwout_count();
 394   if (throwouts != 0)  print(" throwouts='%d'", throwouts);
 395   MethodData* mdo = method->method_data();
 396   if (mdo != NULL) {
 397     uint cnt;
 398     cnt = mdo->decompile_count();
 399     if (cnt != 0)  print(" decompiles='%d'", cnt);
 400     for (uint reason = 0; reason < mdo->trap_reason_limit(); reason++) {
 401       cnt = mdo->trap_count(reason);
 402       if (cnt != 0)  print(" %s_traps='%d'", Deoptimization::trap_reason_name(reason), cnt);
 403     }
 404     cnt = mdo->overflow_trap_count();
 405     if (cnt != 0)  print(" overflow_traps='%d'", cnt);
 406     cnt = mdo->overflow_recompile_count();
 407     if (cnt != 0)  print(" overflow_recompiles='%d'", cnt);
 408   }
 409 }
 410 
 411 void xmlStream::method_text(methodHandle method) {
 412   ResourceMark rm;
 413   assert_if_no_error(inside_attrs(), "printing attributes");
 414   if (method.is_null())  return;
 415   text()->print("%s", method->method_holder()->external_name());
 416   print_raw(" ");  // " " is easier for tools to parse than "::"
 417   method->name()->print_symbol_on(text());
 418   print_raw(" ");  // separator
 419   method->signature()->print_symbol_on(text());
 420 }
 421 
 422 
 423 // ------------------------------------------------------------------
 424 // Output a klass attribute, in the form " klass='pkg/cls'".
 425 // This is used only when there is no ciKlass available.
 426 void xmlStream::klass(Klass* klass) {
 427   assert_if_no_error(inside_attrs(), "printing attributes");
 428   if (klass == NULL) return;
 429   print_raw(" klass='");
 430   klass_text(klass);
 431   print_raw("'");




 363   stamp();
 364   end_elem();
 365   // Output the tail-tag of the enclosing element.
 366   buffer[kind_len] = 0;
 367   tail(buffer);
 368 }
 369 PRAGMA_DIAG_POP
 370 
 371 // Output a timestamp attribute.
 372 void xmlStream::stamp() {
 373   assert_if_no_error(inside_attrs(), "stamp must be an attribute");
 374   print_raw(" stamp='");
 375   out()->stamp();
 376   print_raw("'");
 377 }
 378 
 379 
 380 // ------------------------------------------------------------------
 381 // Output a method attribute, in the form " method='pkg/cls name sig'".
 382 // This is used only when there is no ciMethod available.
 383 void xmlStream::method(const methodHandle& method) {
 384   assert_if_no_error(inside_attrs(), "printing attributes");
 385   if (method.is_null())  return;
 386   print_raw(" method='");
 387   method_text(method);
 388   print("' bytes='%d'", method->code_size());
 389   print(" count='%d'", method->invocation_count());
 390   int bec = method->backedge_count();
 391   if (bec != 0)  print(" backedge_count='%d'", bec);
 392   print(" iicount='%d'", method->interpreter_invocation_count());
 393   int throwouts = method->interpreter_throwout_count();
 394   if (throwouts != 0)  print(" throwouts='%d'", throwouts);
 395   MethodData* mdo = method->method_data();
 396   if (mdo != NULL) {
 397     uint cnt;
 398     cnt = mdo->decompile_count();
 399     if (cnt != 0)  print(" decompiles='%d'", cnt);
 400     for (uint reason = 0; reason < mdo->trap_reason_limit(); reason++) {
 401       cnt = mdo->trap_count(reason);
 402       if (cnt != 0)  print(" %s_traps='%d'", Deoptimization::trap_reason_name(reason), cnt);
 403     }
 404     cnt = mdo->overflow_trap_count();
 405     if (cnt != 0)  print(" overflow_traps='%d'", cnt);
 406     cnt = mdo->overflow_recompile_count();
 407     if (cnt != 0)  print(" overflow_recompiles='%d'", cnt);
 408   }
 409 }
 410 
 411 void xmlStream::method_text(const methodHandle& method) {
 412   ResourceMark rm;
 413   assert_if_no_error(inside_attrs(), "printing attributes");
 414   if (method.is_null())  return;
 415   text()->print("%s", method->method_holder()->external_name());
 416   print_raw(" ");  // " " is easier for tools to parse than "::"
 417   method->name()->print_symbol_on(text());
 418   print_raw(" ");  // separator
 419   method->signature()->print_symbol_on(text());
 420 }
 421 
 422 
 423 // ------------------------------------------------------------------
 424 // Output a klass attribute, in the form " klass='pkg/cls'".
 425 // This is used only when there is no ciKlass available.
 426 void xmlStream::klass(Klass* klass) {
 427   assert_if_no_error(inside_attrs(), "printing attributes");
 428   if (klass == NULL) return;
 429   print_raw(" klass='");
 430   klass_text(klass);
 431   print_raw("'");


< prev index next >