< prev index next >

src/hotspot/share/code/dependencies.cpp

Print this page




 843     if (arg.is_null())  continue;
 844     const char* what;
 845     if (j == ctxkj) {
 846       assert(arg.is_metadata(), "must be");
 847       what = "context";
 848       put_star = !Dependencies::is_concrete_klass((Klass*)arg.metadata_value());
 849     } else if (arg.is_method()) {
 850       what = "method ";
 851       put_star = !Dependencies::is_concrete_method((Method*)arg.metadata_value(), NULL);
 852     } else if (arg.is_klass()) {
 853       what = "class  ";
 854     } else {
 855       what = "object ";
 856     }
 857     st->print("  %s = %s", what, (put_star? "*": ""));
 858     if (arg.is_klass()) {
 859       st->print("%s", ((Klass*)arg.metadata_value())->external_name());
 860     } else if (arg.is_method()) {
 861       ((Method*)arg.metadata_value())->print_value_on(st);
 862     } else if (arg.is_oop()) {
 863       arg.oop_value()->print_value_on(st);
 864     } else {
 865       ShouldNotReachHere(); // Provide impl for this type.
 866     }
 867 
 868     st->cr();
 869   }
 870   if (witness != NULL) {
 871     bool put_star = !Dependencies::is_concrete_klass(witness);
 872     st->print_cr("  witness = %s%s",
 873                   (put_star? "*": ""),
 874                   witness->external_name());
 875   }
 876 }
 877 
 878 void Dependencies::DepStream::log_dependency(Klass* witness) {
 879   if (_deps == NULL && xtty == NULL)  return;  // fast cutout for runtime
 880   ResourceMark rm;
 881   const int nargs = argument_count();
 882   GrowableArray<DepArgument>* args = new GrowableArray<DepArgument>(nargs);
 883   for (int j = 0; j < nargs; j++) {




 843     if (arg.is_null())  continue;
 844     const char* what;
 845     if (j == ctxkj) {
 846       assert(arg.is_metadata(), "must be");
 847       what = "context";
 848       put_star = !Dependencies::is_concrete_klass((Klass*)arg.metadata_value());
 849     } else if (arg.is_method()) {
 850       what = "method ";
 851       put_star = !Dependencies::is_concrete_method((Method*)arg.metadata_value(), NULL);
 852     } else if (arg.is_klass()) {
 853       what = "class  ";
 854     } else {
 855       what = "object ";
 856     }
 857     st->print("  %s = %s", what, (put_star? "*": ""));
 858     if (arg.is_klass()) {
 859       st->print("%s", ((Klass*)arg.metadata_value())->external_name());
 860     } else if (arg.is_method()) {
 861       ((Method*)arg.metadata_value())->print_value_on(st);
 862     } else if (arg.is_oop()) {
 863       oopDesc::print_value_on(st, arg.oop_value());
 864     } else {
 865       ShouldNotReachHere(); // Provide impl for this type.
 866     }
 867 
 868     st->cr();
 869   }
 870   if (witness != NULL) {
 871     bool put_star = !Dependencies::is_concrete_klass(witness);
 872     st->print_cr("  witness = %s%s",
 873                   (put_star? "*": ""),
 874                   witness->external_name());
 875   }
 876 }
 877 
 878 void Dependencies::DepStream::log_dependency(Klass* witness) {
 879   if (_deps == NULL && xtty == NULL)  return;  // fast cutout for runtime
 880   ResourceMark rm;
 881   const int nargs = argument_count();
 882   GrowableArray<DepArgument>* args = new GrowableArray<DepArgument>(nargs);
 883   for (int j = 0; j < nargs; j++) {


< prev index next >