< prev index next >

src/share/vm/code/dependencies.cpp

Print this page




 725   if (witness != NULL) {
 726     xtty->begin_elem("dependency_failed");
 727   } else {
 728     xtty->begin_elem("dependency");
 729   }
 730   xtty->print(" type='%s'", dep_name(dept));
 731   if (ctxkj >= 0) {
 732     xtty->object("ctxk", args->at(ctxkj).metadata_value());
 733   }
 734   // write remaining arguments, if any.
 735   for (int j = 0; j < args->length(); j++) {
 736     if (j == ctxkj)  continue;  // already logged
 737     DepArgument arg = args->at(j);
 738     if (j == 1) {
 739       if (arg.is_oop()) {
 740         xtty->object("x", Handle(thread, arg.oop_value()));
 741       } else {
 742         xtty->object("x", arg.metadata_value());
 743       }
 744     } else {
 745       char xn[10]; sprintf(xn, "x%d", j);
 746       if (arg.is_oop()) {
 747         xtty->object(xn, Handle(thread, arg.oop_value()));
 748       } else {
 749         xtty->object(xn, arg.metadata_value());
 750       }
 751     }
 752   }
 753   if (witness != NULL) {
 754     xtty->object("witness", witness);
 755     xtty->stamp();
 756   }
 757   xtty->end_elem();
 758 }
 759 
 760 void Dependencies::print_dependency(DepType dept, GrowableArray<DepArgument>* args,
 761                                     Klass* witness, outputStream* st) {
 762   ResourceMark rm;
 763   ttyLocker ttyl;   // keep the following output all in one block
 764   st->print_cr("%s of type %s",
 765                 (witness == NULL)? "Dependency": "Failed dependency",




 725   if (witness != NULL) {
 726     xtty->begin_elem("dependency_failed");
 727   } else {
 728     xtty->begin_elem("dependency");
 729   }
 730   xtty->print(" type='%s'", dep_name(dept));
 731   if (ctxkj >= 0) {
 732     xtty->object("ctxk", args->at(ctxkj).metadata_value());
 733   }
 734   // write remaining arguments, if any.
 735   for (int j = 0; j < args->length(); j++) {
 736     if (j == ctxkj)  continue;  // already logged
 737     DepArgument arg = args->at(j);
 738     if (j == 1) {
 739       if (arg.is_oop()) {
 740         xtty->object("x", Handle(thread, arg.oop_value()));
 741       } else {
 742         xtty->object("x", arg.metadata_value());
 743       }
 744     } else {
 745       char xn[12]; sprintf(xn, "x%d", j);
 746       if (arg.is_oop()) {
 747         xtty->object(xn, Handle(thread, arg.oop_value()));
 748       } else {
 749         xtty->object(xn, arg.metadata_value());
 750       }
 751     }
 752   }
 753   if (witness != NULL) {
 754     xtty->object("witness", witness);
 755     xtty->stamp();
 756   }
 757   xtty->end_elem();
 758 }
 759 
 760 void Dependencies::print_dependency(DepType dept, GrowableArray<DepArgument>* args,
 761                                     Klass* witness, outputStream* st) {
 762   ResourceMark rm;
 763   ttyLocker ttyl;   // keep the following output all in one block
 764   st->print_cr("%s of type %s",
 765                 (witness == NULL)? "Dependency": "Failed dependency",


< prev index next >