RFR: 8290840: Refactor the "os" class [v8]
Stefan Karlsson
stefank at openjdk.org
Wed Aug 3 07:22:12 UTC 2022
On Wed, 3 Aug 2022 04:21:55 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Please see [JDK-8290840](https://bugs.openjdk.org/browse/JDK-8290840) for the detailed proposal.
>>
>> The `os` class, declared in os.hpp, forms the major part of the HotSpot porting interface. Its structure has gradually deteriorated over the years as new ports are created and new APIs are added.
>>
>> This RFE tries to address the following:
>>
>> - Clearly specify where a porting API should be declared and defined among the various `os*.cpp` and `os*.hpp` files.
>> - Avoid the inappropriate inclusion of OS-specific APIs (such as the `os::Linux class`) by platform-independent source files.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> Revert "simplified rarely-defined function os::resolve_function_descriptor()"
>
> This reverts commit 72efa9c0f81105d2f95e06e64e0123a8ac3a1745.
Three more nits, otherwise looks good.
src/hotspot/os/bsd/os_bsd.inline.hpp line 29:
> 27:
> 28: #include "runtime/os.hpp"
> 29: #include "os_bsd.hpp"
Change to:
#include "os_bsd.hpp"
#include "runtime/os.hpp"
src/hotspot/os/linux/os_linux.inline.hpp line 30:
> 28: #include "runtime/os.hpp"
> 29: #include "os_linux.hpp"
> 30: #include "os_posix.inline.hpp"
Change to:
#include "os_linux.hpp"
#include "runtime/os.hpp"
#include "os_posix.inline.hpp"
src/hotspot/os/windows/os_windows.inline.hpp line 32:
> 30: #include "os_windows.hpp"
> 31: #include "runtime/javaThread.hpp"
> 32: #include "runtime/mutex.hpp"
Change to:
#include "os_windows.hpp"
#include "runtime/javaThread.hpp"
#include "runtime/mutex.hpp"
-------------
Marked as reviewed by stefank (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9600
More information about the hotspot-dev
mailing list