RFR: 8134540: Much nearly duplicated code for PerfMemory support [v3]
Harold Seigel
hseigel at openjdk.java.net
Fri Jan 15 18:38:06 UTC 2021
On Fri, 15 Jan 2021 15:04:09 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> src/hotspot/os/posix/os_posix.inline.hpp line 45:
>>
>>> 43:
>>> 44:
>>> 45: inline int os::close(int fd) {
>>
>> Does this have to be in the inline header? not, simply, os_posix.cpp?
>
> But actually, I believe we should just scrap `os::close(int fd)` altogether. It really does not bring anything to the table. On all platforms its ::close(). Also, we do call raw ::close() in many places anyway, including right here in perf memory code.
>
> Note that this contrasts with os::closedir(), which on Windows has a windows-specific implementation.
os::close() is called in several places, including from shared code, So, I would prefer not to delete it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2037
More information about the hotspot-runtime-dev
mailing list