# HG changeset patch # User vlivanov # Date 1412008008 25200 # Node ID a270e0fac50e86fa4a8624ae622d7bea00990d81 # Parent 9ad70cd3236847ab919786e8001afa2e0b5ae3b7 8058578: -XX:+TraceDependencies is broken for call_site_target_value dependency type Reviewed-by: jrose, kvn diff -r 9ad70cd32368 -r a270e0fac50e hotspot/src/share/vm/code/dependencies.cpp --- a/hotspot/src/share/vm/code/dependencies.cpp Thu Sep 25 12:10:57 2014 +0400 +++ b/hotspot/src/share/vm/code/dependencies.cpp Mon Sep 29 09:26:48 2014 -0700 @@ -567,12 +567,16 @@ what = "object "; } tty->print(" %s = %s", what, (put_star? "*": "")); - if (arg.is_klass()) + if (arg.is_klass()) { tty->print("%s", ((Klass*)arg.metadata_value())->external_name()); - else if (arg.is_method()) + } else if (arg.is_method()) { ((Method*)arg.metadata_value())->print_value(); - else + } else if (arg.is_oop()) { + arg.oop_value()->print_value_on(tty); + } else { ShouldNotReachHere(); // Provide impl for this type. + } + tty->cr(); } if (witness != NULL) { @@ -609,7 +613,11 @@ int nargs = argument_count(); GrowableArray* args = new GrowableArray(nargs); for (int j = 0; j < nargs; j++) { - args->push(argument(j)); + if (type() == call_site_target_value) { + args->push(argument_oop(j)); + } else { + args->push(argument(j)); + } } int argslen = args->length(); Dependencies::print_dependency(type(), args, witness);