RFR: JDK-8221851: Use of THIS_FILE in hotspot invalidates precompiled header on Linux/GCC

Kim Barrett kim.barrett at oracle.com
Thu Apr 4 22:17:51 UTC 2019


> On Apr 4, 2019, at 6:03 PM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
> 
> 
> On 2019-04-04 14:26, Kim Barrett wrote:
>> 
>> OK, I can do that.
>> 
>> ------------------------------------------------------------------------------
>> src/hotspot/share/utilities/macros.hpp
>>  645 #if FILE_MACRO_OFFSET
>>  646 #define THIS_FILE (__FILE__ + FILE_MACRO_OFFSET)
>>  647 #else
>>  648 #define THIS_FILE __FILE__
>>  649 #endif
>> 
>> Is the "#if FILE_MACRO_OFFSET" an intentional test for 0, or is this
>> an implicit test for "defined"?
>> 
>> If the former, e.g. we're assuming it will always be defined but might
>> have a 0 value, then I'd skip it and just unconditionally define
>> THIS_FILE as (__FILE__ + FILE_MACRO_OFFSET).
> 
> Right, that makes sense. I was sort of hedging for all possibilities here, but as the build logic is currently structured, it will always be defined, just sometimes 0.
> 
> New webrev: http://cr.openjdk.java.net/~erikj/8221851/webrev.02/

src/hotspot changes look good.




More information about the build-dev mailing list