JDK-8198473 : Cache field offsets for well known classes defined in javaClasses.hpp
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-02-21
  • Updated: 2024-03-18
  • Resolved: 2024-03-18
Related Reports
Duplicate :  
Relates :  
Description
There is a set of well known classes (from java.base) defined in javaClasses.hpp. Some of the fields in these classes are used by hotspot and need to be computed by the VM. The offset computing is done during startup. These field offsets should be cached with CDS archive. Performance test shows small much measurable startup time improvement with caching of these field offsets.
Comments
[~dcubed] indeed, this feature was implemented in JDK-8194759 https://github.com/openjdk/jdk/commit/f987dec395f709652bdb694659b5651362ad89b1#diff-a8ed79cab8961103a78187704b7a14fd00b322da06e75518bcfd888d9b940040 I am closing this issue as a duplicate of the above RFE.
18-03-2024

Issues should only be closed as "Fixed" when there is an associated changeset. There's no indication in this RFE how it was "fixed" so I can't close it as a duplicate of some other bug. Perhaps it was fixed by the work on: JDK-8194759 Support caching class mirror objects but that's not clear (to me at least).
15-03-2024