RFR: 8320935: Move CDS config initialization code to cdsConfig.cpp [v2]
Calvin Cheung
ccheung at openjdk.org
Sat Dec 2 03:38:45 UTC 2023
On Sat, 2 Dec 2023 00:32:30 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> src/hotspot/share/cds/cdsConfig.cpp line 34:
>>
>>> 32: #include "logging/log.hpp"
>>> 33: #include "runtime/arguments.hpp"
>>> 34: #include "runtime/java.hpp"
>>
>> I was able to build with your patch without including `java.hpp`.
>> The #include java.hpp could also be removed from arguments.cpp.
>
> cdsConfig.cpp needs the declaration of `vm_exit_during_initialization()` from java.hpp. Although java.hpp is included by arguments.hpp, we usually try to avoid such indirectly inclusions. Otherwise if arguments.hpp is changed to no longer include java.hpp, then cdsConfig.hpp will fail to compile.
>
> I am not sure about arguments.cpp -- if java.hpp is already included by arguments.hpp, do we need to explicitly include it in arguments.cpp? I'll leave that alone in this PR.
Thanks for the explanation. Looks good then.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16868#discussion_r1412714559
More information about the serviceability-dev
mailing list