RFR: 8303942: os::write should write completely [v5]
Afshin Zafari
duke at openjdk.org
Mon May 8 12:12:29 UTC 2023
On Mon, 8 May 2023 12:03:54 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8303942: os::write should write completely
>
> src/hotspot/share/jfr/writers/jfrStreamWriterHost.inline.hpp line 77:
>
>> 75: inline void StreamWriterHost<Adapter, AP>::write_bytes(const u1* buf, intptr_t len) {
>> 76: assert(len >= 0, "invariant");
>> 77: const unsigned int nBytes = len > INT_MAX ? INT_MAX : (unsigned int)len;
>
> Does this not mean data loss, if you are removing the while loop? Only one write attempt is made, INT_MAX which is 2147483647. But the len parameter is intptr_t?
The `os::write` itself writes in a loop.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13750#discussion_r1187368952
More information about the hotspot-dev
mailing list