JDK-8343294 : Stress mode to randomize register selection
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-10-30
  • Updated: 2025-08-27
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
There are numerous opportunities to randomize register selection in the C2 register allocator for stress testing purposes (see `PhaseChaitin::choose_color`). We should add a `StressRegAlloc` flag similar in fashion to other stress flags such as `StressCCP`, `StressIGVN`, `StressIncrementalInlining` etc.

Comments
Thanks for working on this [~jbhateja], I'd be happy to review the changes. Is the draft PR ready for an initial review, or should I wait a bit?
27-08-2025

Draft PR https://github.com/openjdk/jdk/pull/26551
30-07-2025

I started prototyping for random color selection, need to evaluate the performance impact, and stitch in PhaseChaitin https://github.com/jatin-bhateja/external_staging/blob/main/Code/c/ra_tuning/random_color.cpp
28-07-2025

I think we should also try to randomize the stack slot # that we spill to.
03-07-2025