< prev index next >

src/hotspot/share/code/dependencies.cpp

Print this page

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




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

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