JDK-8353041 : NeverBranchNode causes incorrect block frequency calculation
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8,11,17,21,25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2025-03-27
  • Updated: 2025-05-14
  • Resolved: 2025-04-09
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 25
25 b18Fixed
Related Reports
Relates :  
Relates :  
Description
In
https://github.com/openjdk/jdk/pull/23962
it has been discussed that the C2 block frequency calculation  needs to be adjusted.
Comments
Hi [~mbaesken]. No I wasn't planning on backporting it, as I didn't think it met the criteria, but if you feel differently go ahead and follow the openjdk process to get maintainer approvals.
14-05-2025

Hi [~dlong] do you plan to backport it to 21 and maybe 17 ?
09-05-2025

Changeset: 776e1cf1 Branch: master Author: Dean Long <dlong@openjdk.org> Date: 2025-04-09 20:06:49 +0000 URL: https://git.openjdk.org/jdk/commit/776e1cf1dfefd7cb1a0190ab71f71ad5ff25d0e4
09-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24390 Date: 2025-04-02 19:51:37 +0000
02-04-2025

ILW = Incorrect computation of block frequency affecting performance, reproducible with infinite loop, no workaround = MMH = P3
28-03-2025

There is at least one place where this is known to show up, and that is with infinite loops that cause a NeverBranchNode to be used.
28-03-2025

ILW = Potential incorrect computation of block frequency affecting performance, found by code inspection; never showed up, no workaround = MLH = P4
28-03-2025