RFR: 8374945: Avoid fstat in os::open
Jonas Norlinder
jnorlinder at openjdk.org
Mon Jan 12 09:37:45 UTC 2026
On Sat, 10 Jan 2026 16:55:08 GMT, Jonas Norlinder <jnorlinder at openjdk.org> wrote:
> Eliminate unnecessary calls to fstat in os::open akin to JDK-8373647. This optimization reduces system overhead.
Thanks for the review, Claes!
> This would skip the (weird only-once) FD_CLOEXEC block...
Indeed. I will open a PR to remove that check, as it is no longer needed; support for such old kernels ceased long ago. With your comment in mind I think we should wait with this one until we have cleaned up that first.
> Also the (...) != 0 seem redundant.
Yes. It helped me when I was reading it out loud. Can remove if it confuses.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29152#issuecomment-3737635157
More information about the hotspot-runtime-dev
mailing list