RFR: 8303942: os::write should write completely [v5]
Markus Grönlund
mgronlun at openjdk.org
Mon May 8 12:12:30 UTC 2023
On Mon, 8 May 2023 12:07:39 GMT, Afshin Zafari <duke at openjdk.org> wrote:
>> 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.
Yes, but only loops INT_MAX now?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13750#discussion_r1187370641
More information about the hotspot-dev
mailing list