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

Erik Helin erik.helin at oracle.com
Fri Mar 9 05:57:43 UTC 2018


On 03/08/2018 09:43 PM, Thomas Stüfe wrote:
> On Thu, Mar 8, 2018 at 4:19 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com>
> wrote:
> 
>> On 3/8/18 1:22 AM, Thomas Stüfe wrote:
>>
>>> Hi Stefan,
>>>
>>> thanks, this is a good cleanup.
>>>
>>> Sometimes I wish there were a method to automatically strip code from
>>> unnecessary includes.
>>>
>>
>> I also wish for that. Can IDE do it for you?
>>
>> Thanks,
>> Vladimir
>>
>>
> Not that I know, no.

But I know of one :) https://include-what-you-use.org/

iwyu was developed in-house at Google and then open sourced. I have 
never tried it with the HotSpot source code though, but it seems pretty 
easy to get started.

Thanks,
Erik

> When I am feeling really patient I do it the hard way by removing all
> includes and re-adding them one by one.
> 
> Same with friend definitions, btw.
> 
> But its annoying work.
> 
> ..Thomas
> 
> 
>>
>>
>>> Thanks, Thomas
>>>
>>>
>>>
>>> On Wed, Mar 7, 2018 at 11:33 PM, Stefan Karlsson <
>>> stefan.karlsson at oracle.com
>>>
>>>> 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
>>>>
>>>> The patch contains a few number added includes need after this
>>>> restructuring.
>>>>
>>>> Thanks,
>>>> StefanK
>>>>
>>>>


More information about the hotspot-dev mailing list