JDK-8353175 : Eliminate double iteration of stream in FieldDescriptor reinitialization
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21,25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-03-28
  • Updated: 2025-09-05
  • Resolved: 2025-04-14
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 b19Fixed
Related Reports
Relates :  
Description
This is a partial fix for performance regression covered in https://bugs.openjdk.org/browse/JDK-8352075

Since FieldDescriptor::reinitialize() looks up FieldInfo calling InstanceKlass::field(int). After https://bugs.openjdk.org/browse/JDK-8292818 this requires an iteration through all class fields while the information is in many cases readily available.
Comments
[jdk21u-fix-request] Approval Request from Radim Vansa Partially fixes performance regression introduced in 21
05-08-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/2010 Date: 2025-07-22 15:15:13 +0000
22-07-2025

Changeset: f169fc5a Branch: master Author: Radim Vansa <rvansa@openjdk.org> Committer: Johan Sjölen <jsjolen@openjdk.org> Date: 2025-04-14 08:18:59 +0000 URL: https://git.openjdk.org/jdk/commit/f169fc5a99ee2b485e156c043134ab76b7e5ebd9
14-04-2025

RT Triage: Copying triage of this issue from JDK-8352075 ILW=MMH=P3 Impact: Performance degradation, not a crash Likelihood: Possible existing generators for this many fields Workaround: User doesn't usually have control over these generators
28-03-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24290 Date: 2025-03-28 11:03:29 +0000
28-03-2025

Attached CCC.java (reproducer) from the related issue, courtesy of [~shade]
28-03-2025