New hotspot build only builds "PRODUCT"

Volker Simonis volker.simonis at gmail.com
Fri May 8 17:13:59 UTC 2015


On Fri, May 8, 2015 at 4:26 PM, Volker Simonis <volker.simonis at gmail.com> wrote:
> On Wed, May 6, 2015 at 10:24 AM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
>>
>> On 2015-05-05 18:12, Volker Simonis wrote:
>>>
>>> On Tue, May 5, 2015 at 3:31 PM, Magnus Ihse Bursie
>>> <magnus.ihse.bursie at oracle.com> wrote:
>>> OK, I see so I won't mess with debug builds then:)
>>
>> I think leaving debug builds until we are at the stage of organizing flags
>> better is OK. Some flags will come from configure, some are based on debug
>> level etc.
>>>
>>> But another question: I just compared the dependencies compiler flags
>>> of the old and the new build and realized that for the old build we
>>> use '-MMD -MP -MF -fpch-deps' but in the new build we only use '-MMD
>>> -MF' (except for x86 which is the only platform in the new build where
>>> we still use -fpch-deps). Is this intentional as well?
>>>
>>> I think the omission of -MP may be related to "8072106: Properly
>>> handle dependencies for deleted header files" which created the
>>> corresponding targets manually. But what about '-fpch-deps', shouldn't
>>> we always use it?
>>
>> As Magnus said, -MP is more efficient, but we have a general solution that
>> achieves the same thing for all platforms already.
>>
>> Regarding -fpch-deps, I think we should not use it if we declare proper
>> dependencies from header files to precompiled header and from precompiled
>> header to object files using it. It would just be redundant and with the
>> amount of header files being included everywhere in hotspot, redundancy in
>> dependency file generation is not something we need. I think the current
>> dependency makefiles are already around 50MB!
>
> Hi Erik,
>
> I thought about '-fpch-deps' and I think you're absolutely right! Its
> usage is counter-productive.
> We should really have every .cpp file include all the headers it
> depends on. Using '-fpch-deps' would unnecessarily and drastically
> increase the number of files a compilation unit depends on. And now
> when I think about it this may also be one of the reasons why in the
> old build we actually recompile most of the .ccp files once we change
> a single .hpp file which is included in the .pch file (this was
> recently discussed in another thread).
>
> So if we're lucky, removing '-fpch-deps' may even increase the speed
> of incremental PCH builds.
>

Having said all that, StefanK just reminded me that it was actually me
who  introduced the '-fpch-deps' a few years ago. See the following
mail thread for the justification:

http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-June/006016.html
https://bugs.openjdk.java.net/browse/JDK-7175914

So before removing '-fpch-deps' we should check that we now really get
the same dependencies when building with and without PCH.

Regards,
Volker

> Regards,
> Volker
>
>
>> /Erik
>>


More information about the build-infra-dev mailing list