JDK-8269138 : Move typeArrayOop.inline.hpp include to vectorSupport.cpp
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16,17,18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-06-22
  • Updated: 2021-07-01
  • Resolved: 2021-06-23
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 18
18 b04Fixed
Related Reports
Relates :  
Description
In the loom repository, there is a following circular inclusion problem:

* For target hotspot_variant-server_libjvm_objs_c2_MacroAssembler_x86.o:
In file included from /home/shade/trunks/loom/src/hotspot/share/oops/instanceStackChunkKlass.inline.hpp:43,
                 from /home/shade/trunks/loom/src/hotspot/share/memory/iterator.inline.hpp:38,
                 from /home/shade/trunks/loom/src/hotspot/share/utilities/bitMap.inline.hpp:30,
                 from /home/shade/trunks/loom/src/hotspot/share/gc/shared/markBitMap.inline.hpp:33,
                 from /home/shade/trunks/loom/src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp:31,
                 from /home/shade/trunks/loom/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.inline.hpp:31,
                 from /home/shade/trunks/loom/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp:32,
                 from /home/shade/trunks/loom/src/hotspot/share/gc/shared/barrierSetConfig.inline.hpp:40,
                 from /home/shade/trunks/loom/src/hotspot/share/oops/access.inline.hpp:31,
                 from /home/shade/trunks/loom/src/hotspot/share/oops/typeArrayOop.inline.hpp:30,
                 from /home/shade/trunks/loom/src/hotspot/share/prims/vectorSupport.hpp:31,
                 from /home/shade/trunks/loom/src/hotspot/share/runtime/stubRoutines.hpp:32,
                 from /home/shade/trunks/loom/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp:35:
/home/shade/trunks/loom/src/hotspot/share/runtime/frame.inline.hpp: In member function 'bool frame::is_entry_frame() const':
/home/buildbot/worker/build-jdkX-loom-linux/build/src/hotspot/share/runtime/frame.inline.hpp:47:10: error: 'StubRoutines' has not been declared

We start from including stubRoutines.hpp, and circle back to it through with frame.inline.hpp includes. I believe this is mostly caused by vectorSupport.hpp including typeArrayOop.inline.hpp. It does seem excessive, when typeArrayOop.hpp would do. I think only .inline.hpp and .cpp files are supposed to reference .inline.hpp-s anyway.
Comments
Changeset: 17daf32a Author: Aleksey Shipilev <shade@openjdk.org> Date: 2021-06-23 06:27:40 +0000 URL: https://git.openjdk.java.net/jdk/commit/17daf32a073bc4f12602b4872ce708e09c453ced
23-06-2021