< prev index next >

src/hotspot/share/code/dependencies.cpp

Print this page

 812     } else if (arg.is_klass()) {
 813       what = "class  ";
 814     } else {
 815       what = "object ";
 816     }
 817     st->print("  %s = %s", what, (put_star? "*": ""));
 818     if (arg.is_klass()) {
 819       st->print("%s", ((Klass*)arg.metadata_value())->external_name());
 820     } else if (arg.is_method()) {
 821       ((Method*)arg.metadata_value())->print_value_on(st);
 822     } else if (arg.is_oop()) {
 823       arg.oop_value()->print_value_on(st);
 824     } else {
 825       ShouldNotReachHere(); // Provide impl for this type.
 826     }
 827 
 828     st->cr();
 829   }
 830   if (witness != nullptr) {
 831     bool put_star = !Dependencies::is_concrete_klass(witness);
 832     st->print_cr("  witness = %s%s",
 833                   (put_star? "*": ""),
 834                   witness->external_name());




 835   }
 836 }
 837 
 838 void Dependencies::DepStream::log_dependency(Klass* witness) {
 839   if (_deps == nullptr && xtty == nullptr)  return;  // fast cutout for runtime
 840   ResourceMark rm;
 841   const int nargs = argument_count();
 842   GrowableArray<DepArgument>* args = new GrowableArray<DepArgument>(nargs);
 843   for (int j = 0; j < nargs; j++) {
 844     if (is_oop_argument(j)) {
 845       args->push(argument_oop(j));
 846     } else {
 847       args->push(argument(j));
 848     }
 849   }
 850   int argslen = args->length();
 851   if (_deps != nullptr && _deps->log() != nullptr) {
 852     if (ciEnv::current() != nullptr) {
 853       Dependencies::write_dependency_to(_deps->log(), type(), args, witness);
 854     } else {

 812     } else if (arg.is_klass()) {
 813       what = "class  ";
 814     } else {
 815       what = "object ";
 816     }
 817     st->print("  %s = %s", what, (put_star? "*": ""));
 818     if (arg.is_klass()) {
 819       st->print("%s", ((Klass*)arg.metadata_value())->external_name());
 820     } else if (arg.is_method()) {
 821       ((Method*)arg.metadata_value())->print_value_on(st);
 822     } else if (arg.is_oop()) {
 823       arg.oop_value()->print_value_on(st);
 824     } else {
 825       ShouldNotReachHere(); // Provide impl for this type.
 826     }
 827 
 828     st->cr();
 829   }
 830   if (witness != nullptr) {
 831     bool put_star = !Dependencies::is_concrete_klass(witness);
 832     st->print("  witness = %s%s",
 833               (put_star ? "*": ""),
 834               witness->external_name());
 835     if (witness->is_instance_klass()) {
 836       st->print(" (%s)", InstanceKlass::cast(witness)->init_state_name());
 837     }
 838     st->cr();
 839   }
 840 }
 841 
 842 void Dependencies::DepStream::log_dependency(Klass* witness) {
 843   if (_deps == nullptr && xtty == nullptr)  return;  // fast cutout for runtime
 844   ResourceMark rm;
 845   const int nargs = argument_count();
 846   GrowableArray<DepArgument>* args = new GrowableArray<DepArgument>(nargs);
 847   for (int j = 0; j < nargs; j++) {
 848     if (is_oop_argument(j)) {
 849       args->push(argument_oop(j));
 850     } else {
 851       args->push(argument(j));
 852     }
 853   }
 854   int argslen = args->length();
 855   if (_deps != nullptr && _deps->log() != nullptr) {
 856     if (ciEnv::current() != nullptr) {
 857       Dependencies::write_dependency_to(_deps->log(), type(), args, witness);
 858     } else {
< prev index next >