RFR: 8290840: Refactor the "os" class [v4]

Thomas Stuefe stuefe at openjdk.org
Tue Aug 2 06:56:37 UTC 2022


On Tue, 2 Aug 2022 06:46:38 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 four additional commits since the last revision:
> 
>  - clarify comment
>  - PLATFORM_PRINT_NATIVE_STACK -> HAVE_PLATFORM_PRINT_NATIVE_STACK
>  - simplified rarely-defined function os::resolve_function_descriptor()
>  - Made workaround_expand_exec_shield_cs_limit() a static function in os_linux.cpp

Still good.

src/hotspot/os/linux/os_linux.cpp line 4476:

> 4474:  * @see JDK-8023956
> 4475:  */
> 4476: void workaround_expand_exec_shield_cs_limit() {

Make static?

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

Marked as reviewed by stuefe (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9600


More information about the hotspot-dev mailing list