JDK-8296336 : Fallback for method handle intrinsic allocation failures
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 20
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-11-03
  • Updated: 2024-08-10
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
While discussing JDK-8295724, the idea came up, to use C2I adapters and the interpreter entries when an attempt to allocate a method handle intrinsic failed because of missing free space in code cache. This would need an interpreter implementation for "_linkToNative" which is currently not available on any platform. In addition, C2I adapters need space in the code cache. We should check if this fallback solution makes sense or if there's another one.
Comments
There's already a precedent in template interpreter to handle native method calls with InterpreterRuntime::slow_signature_handler and SlowSignatureHandler.
04-11-2022

Another idea from @iklam:"Is it possible to have a backup stub? It can trap to c code, do what the method handle intrinsics is supposed to do (by iterating on the signature), and continue execution."
04-11-2022