< prev index next >

src/hotspot/share/code/dependencies.cpp

Print this page

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




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

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