RFR: 8199275: Fix inclusions of allocation.inline.hpp

Kim Barrett kim.barrett at oracle.com
Thu Mar 8 06:18:38 UTC 2018

> On Mar 8, 2018, at 12:28 AM, David Holmes <david.holmes at oracle.com> wrote:
> Hi Stefan,
> On 8/03/2018 8:33 AM, Stefan Karlsson wrote:
>> Hi all,
>> Please review this small patch to fix some includes of allocation.inline.hpp.
>> http://cr.openjdk.java.net/~stefank/8199275/webrev.01/
>> https://bugs.openjdk.java.net/browse/JDK-8199275
>> The changes are quite simple:
>> 1) SymbolHashMap::~SymbolHashMap and CDSOffsets::CDSOffsets were moved to .cpp files, since they used functions from allocation.inline.hpp.
>> 2) includes of allocation.inline.hpp were added to .cpp and .inline.hpp files that used functions from allocation.inline.hpp
> I'm a little confused. Where cpp files were using functions from allocation.inline.hpp but not including it, where were they getting the definitions from? My initial guess is precompiled.hpp, but that wouldn't address builds with precompiled headers disabled ??

My guess: constantPool.hpp is being changed to include allocation.hpp
rather than allocation.inline.hpp. The fanout from constantPool.hpp is
(to me) surprisingly broad: thread.hpp includes frame.hpp, which
includes method.hpp, which includes constantPool.hpp.  Nearly 70 files
directly include thread.hpp, and who knows how many additional files
indirectly include it.

>> The patch contains a few number added includes need after this restructuring.
> Overall seems okay. Proof as always is in the building, with and without PCH.
> Thanks,
> David
>> Thanks,
>> StefanK

More information about the hotspot-dev mailing list