8058578: -XX:+TraceDependencies is broken for call_site_target_value dependency type
authorvlivanov
Mon, 29 Sep 2014 09:26:48 -0700
changeset 26914 a270e0fac50e
parent 26913 9ad70cd32368
child 26915 ba674d5d0f77
8058578: -XX:+TraceDependencies is broken for call_site_target_value dependency type Reviewed-by: jrose, kvn
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<DepArgument>* args = new GrowableArray<DepArgument>(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);