RFR: 8256008: UL does not report anything if disk writing fails [v2]
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Wed Dec 2 00:51:59 UTC 2020
On Tue, 1 Dec 2020 15:53:39 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Yasumasa Suenaga has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>>
>> - refactoring
>> - Merge branch 'master' into JDK-8256008
>> - Fix typo
>> - 8256008: UL does not report anything if disk writing fails
>
> Hi Yasumasa,
>
> this is good, but some nits remain, see below.
>
> Cheers, Thomas
@tstuefe Thanks for your review! I updated PR. Could you review again?
> src/hotspot/share/logging/logFileStreamOutput.cpp line 109:
>
>> 107: { \
>> 108: int result = op; \
>> 109: if (result <= 0) { \
>
> May be not completely correct for all values of op:
> - fprintf returns a negative value (0 is valid if length to write was 0). I did not check jio_fprintf but I assume the return semantics are the same?
> - write_decorations returns 0 if it did not write any decorations, which is valid
`jio_fprintf()` would call `vfprintf()`, so I concerned in case that `vfprintf()` cannot write enough. Callers of `jio_fprintf()` other than `write_decorations()` would write 1 byte at least.
However `write_decorations()` might not write any chars, and also `vfprintf()` in glibc does not seem to return halfway value. So I updated condition to `< 0`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1106
More information about the hotspot-runtime-dev
mailing list