8399077: [Valhalla] Ensure Valhalla is really turned off without --enable-preview #34224
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.42) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 337 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.348
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #34224"
general
weight: 0.35
vnkozlov
Valhalla specific functions should behave such that Valhalla specific code is not generated when preview features are not enabled. In C1,
Instruction::maybe_null_free_arrray()does not do that. It may returntrueeven though preview features are disabled, because it is missing a similar guard toInstruction::maybe_flat_array(). This PR adds this guard, such that C1 will not profile the null-free bit of the mark word when Valhalla is disabled.To test this change, I wrote a test that sets the null-free bit using
Unsafeto make this bug observable with-XX:+PrintMethodData.A thorough search of Valhalla specific functions throughout Hotspot has not found any other instances missing guards, so Valhalla should be properly contained to
--enable-previewafter this. :crossed_fingers:Testing:
- [ ] Github Actions
- [x] tier1,tier2,tier3 plus internal stress testing
Thanks,
Manuel
---------
<!-- Anything below this marker will be automatically updated, please do not edit manually! -->
---------
Progress
Issue
JDK-8399077: [Valhalla] Ensure Valhalla is really turned off without --enable-preview (Bug - P3)(⚠️ The fixVersion in this issue is [28] but the fixVersion in .jcheck/conf is 29, a new backport will be created when this pr is integrated.)
Reviewers
Vladimir Kozlov (@vnkozlov - Reviewer)
Reviewing
<details><summary>Using <code>git</code></summary>
Checkout this PR locally: \
$ git fetch https://git.openjdk.org/jdk.git pull/34224/head:pull/34224\$ git checkout pull/34224Update a local copy of the PR: \
$ git checkout pull/34224\$ git pull https://git.openjdk.org/jdk.git pull/34224/head</details>
<details><summary>Using Skara CLI tools</summary>
Checkout this PR locally: \
$ git pr checkout 34224View PR using the GUI difftool: \
$ git pr show -t 34224</details>
<details><summary>Using diff file</summary>
Download this PR as a diff file: \
<a href="https://git.openjdk.org/jdk/pull/34224.diff">https://git.openjdk.org/jdk/pull/34224.diff</a>
</details>
<details><summary>Using Webrev</summary>
Link to Webrev Comment
</details>