< prev index next >

src/hotspot/share/code/dependencies.cpp

Print this page

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




 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 {

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