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

Stefan Karlsson stefan.karlsson at oracle.com
Thu Mar 8 06:38:48 UTC 2018

On 2018-03-08 06:28, David Holmes 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 ??

I see that Kim explained this in his mail. You almost always get into 
this situation when you start to remove includes from the headers. 
Including .inline.hpp files and .hpp files with a large transitive 
closure of its includes is making the situation worse, and doing some 
cleanup in this area will help reduce the problem.

>> 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