RFR: 8259894: refactor parts of jvm.h into jvm_io.h and jvm_constants.h [v2]

Coleen Phillimore coleenp at openjdk.java.net
Fri Jan 22 23:27:42 UTC 2021


On Thu, 21 Jan 2021 03:11:21 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> src/hotspot/share/runtime/os.hpp line 28:
>> 
>>> 26: #define SHARE_RUNTIME_OS_HPP
>>> 27: 
>>> 28: #include "jvm_md.h"
>> 
>> jvm_md.h should not be included directly by any file - it is an internal implementation detail.
>
> os.hpp is used by almost all HotSpot .o files, so if we keep jvm.h here, that defeats the purpose of this PR. As David and I discussed offline, jvm_md.h is a kludgy legacy porting layer for stuff like DIR, which is used by os.hpp.
> 
> jvm_md.h contains comments like the following that haven't been touched for decades .... so it's probably a good idea to not disturb it now.
> 
> /*
>  * This file is currently collecting system-specific dregs for the
>  * JNI conversion, which should be sorted out later.
>  */

What does os.hpp need from jvm_md.h ? Can that be moved to os.cpp ? I guess I can look at the file and answer my own question.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2154


More information about the hotspot-dev mailing list