JDK-8012268 : ciReplay: process_ciInstanceKlass: JVM_CONSTANT_MethodHandle not supported
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25,9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-04-15
  • Updated: 2021-09-17
  • Resolved: 2021-09-03
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 18
18 b14Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Relates :  
Description
VM doesn't support JVM_CONSTANT_MethodHandle & JVM_CONSTANT_InvokeDynamic entries in ciInstanceKlass. When iterating over elements it doesn't expect corresponding tags.

It's one of the blockers to successfully replay compilations of methods which use JSR292.

Also, to correctly replay a compilation, MethodHandle & InvokeDynamic info should be dumped as well.  
Comments
Changeset: 14a3ac09 Author: Dean Long <dlong@openjdk.org> Date: 2021-09-03 23:23:10 +0000 URL: https://git.openjdk.java.net/jdk/commit/14a3ac09fe504ea97d269b78872bef6021c976fd
03-09-2021

[~dlong] I agree that forcible resolution of corresponding CP entries should fix the issue. It's an open question whether for JVM_CONSTANT_InvokeDynamic additional verification of target method handle (CallSite.target value after resolution is finished) is required or not. May be too strong for a requirement, but it would definitely help improve the diagnosability.
09-08-2021

[~vlivanov], I don't see where this is an issue, as long as the constant pool tags match. In JDK-8271911 I plan to resolve call sites and method handle constants referenced by the replay file, so this bug may end up as a duplicate.
05-08-2021

[~dlong] Replaying a compilation of a Java method with lambdas should be enough: the class file will contain both types of constants.
09-10-2020

[~vlivanov] What's the best way to reproduce this?
09-10-2020