RFR: 8303942: os::write should write completely
Coleen Phillimore
coleenp at openjdk.org
Wed May 3 11:20:22 UTC 2023
On Tue, 2 May 2023 07:45:03 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
This change looks good.
src/hotspot/os/posix/perfMemory_posix.cpp line 109:
> 107: result = os::write(fd, addr, size);
> 108: if (result == OS_ERR) {
> 109: if (PrintMiscellaneous && Verbose) {
It's not really part of this issue but since the line is changed, can you change it to unconditionally
log_info(os)("Could not write...);
And remove PrintMiscellaneous & Verbose.
-------------
Marked as reviewed by coleenp (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13750#pullrequestreview-1410683064
PR Review Comment: https://git.openjdk.org/jdk/pull/13750#discussion_r1183553916
More information about the hotspot-dev
mailing list