JDK-8210864 : Reduce the use of metaspaceShared.hpp
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-09-18
  • Updated: 2019-06-23
  • Resolved: 2018-09-19
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 12
12 b12Fixed
Related Reports
Relates :  
Description
metaspaceShared.hpp is included indirectly into over 500 files due to this single use in oop.inline.hpp

http://hg.openjdk.java.net/jdk/jdk/file/9c6d5e31618e/src/hotspot/share/oops/oop.inline.hpp#l355

void oopDesc::forward_to(oop p) {
...
  assert(!MetaspaceShared::is_archive_object(oop(this)) &&
         !MetaspaceShared::is_archive_object(p),
         "forwarding archive object");

The problem is whenever I work on metaspceShared.hpp or compactHashtable.hpp (included by the former), I have to repeatedly compile almost every file.

The use in oopDesc::forward_to should be refactored to avoid the excessive inclusion.

Comments
http://cr.openjdk.java.net/~iklam/jdk12/8210864-reduce-metaspaceShared-hpp-include.v01/
18-09-2018