JDK-8058578 : -XX:+TraceDependencies is broken for call_site_target_value dependency type
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8u40,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-09-16
  • Updated: 2015-06-03
  • Resolved: 2014-09-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b35Fixed
Description
-XX:+TraceDependencies crashes when encounters call_site_target_value dependency.
Comments
noreg-hard: the bug involves indy call site, bound to mutable call site, and nmethod with inlined target (a dependency on that call site).
19-09-2014

Suggested fix: diff --git a/src/share/vm/code/dependencies.cpp b/src/share/vm/code/dependencies.cpp --- a/src/share/vm/code/dependencies.cpp +++ b/src/share/vm/code/dependencies.cpp @@ -571,8 +571,12 @@ tty->print("%s", ((Klass*)arg.metadata_value())->external_name()); 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);
16-09-2014

ILW = MLH = P4 I = M = crash in non-product build w/ a tracing flag L = L = non-product binaries w/ -XX:+TraceDependencies & invokedynamic (JSR292) usage in the bytecode W = N = none
16-09-2014