RFR: 8303942: os::write should write completely [v7]

Markus Grönlund mgronlun at openjdk.org
Tue May 9 10:49:28 UTC 2023


On Tue, 9 May 2023 09:58:37 GMT, Afshin Zafari <duke at openjdk.org> wrote:

>> `os::write` is implemented using loops until the whole bytes are written. All uses of `os::write` in a loop are changed to single call. 
>> Platform dependent versions of the `os::write` are also renamed and moved to private sections accordingly.
>> Wrong uses/interpretations of return values from `os::write` in JFR code are corrected.
>> 
>> ###Test
>> local: hotspot tier1
>> mach5: tiers 1-5
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8303942: os::write should write completely

"@mgronlun why does this code break the write up into INT_MAX chunks? Is the incoming len parameter really potentially not containable in a size_t? Using intptr_t for a length seems suspect."

I think it has mostly to do with legacy os::write() implementations and being able to write completely on all platforms.

The len was size_t up until this bug: https://bugs.openjdk.org/browse/JDK-8252090

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

PR Comment: https://git.openjdk.org/jdk/pull/13750#issuecomment-1539941478


More information about the hotspot-dev mailing list