JDK-8361562 : [lworld] Add template-based testing to Valhalla
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P2
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-07-08
  • Updated: 2025-07-08
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
repo-valhallaUnresolved
Related Reports
Relates :  
Description
One of the biggest challenges in project Valhalla is that we don't have any existing code that uses this new language feature. The implementation is only exercised by newly written (or migrated) code. We need better test coverage, especially for the JITs.

Now that the Template-Based Testing Framework (JDK-8344942) is ready, we should use it to write templated tests for Valhalla. One could start by looking at the existing compiler tests in hotspot/jtreg/compiler/valhalla/inlinetypes/ and templatize some of them to increase coverage. Ideally, even IR-framework based tests that verify that a certain optimization kicks in.

Even simpler, we need to increase test coverage of the calling convention by generating all kinds of different (small enough) value classes and pass them around via (C1/C2 compiled and interpreted methods). This would have caught JDK-8348547 and similar issues.
Comments
At the time of filing this, JDK-8344942 wasn't merged into the Valhalla repo yet. I think we should still start writing tests.
08-07-2025