< prev index next >

src/hotspot/share/code/dependencies.cpp

Print this page

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




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

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